mirror of
https://github.com/mandiant/flare-vm.git
synced 2026-10-12 02:18:46 +00:00
Fix issues raised by linter (#738)
* fix linter issue with quotes * fix issue with common.vm cmdlet not recognized
This commit is contained in:
@@ -229,7 +229,10 @@ def build_vm(vm_name, exported_vm_name, snapshots, date, custom_config, do_not_i
|
||||
notice_file_name = snapshot.get("legal_notice", None)
|
||||
if notice_file_name:
|
||||
notice_file_path = rf"C:\Users\{GUEST_USERNAME}\Desktop\{notice_file_name}"
|
||||
set_notice_cmd = f"Import-Module $env:VM_COMMON_DIR\\vm.common\\vm.common.psm1; VM-Set-Legal-Notice (Get-Content '{notice_file_path}' -Raw)"
|
||||
set_notice_cmd = (
|
||||
f"Import-Module $env:VM_COMMON_DIR\\vm.common\\vm.common.psm1; "
|
||||
f"VM-Set-Legal-Notice (Get-Content '{notice_file_path}' -Raw)"
|
||||
)
|
||||
run_command(vm_uuid, set_notice_cmd)
|
||||
|
||||
# Perform clean up: run 'VM-Clean-Up' excluding configured files and folders
|
||||
|
||||
@@ -53,7 +53,7 @@ def __run_vboxmanage(cmd, real_time=False):
|
||||
# which can cause conflicts with external binaries like VBoxManage.
|
||||
# We create a clean environment for the subprocess to use the system's libraries.
|
||||
env = os.environ.copy()
|
||||
if getattr(sys, 'frozen', False) and "LD_LIBRARY_PATH" in env:
|
||||
if getattr(sys, "frozen", False) and "LD_LIBRARY_PATH" in env:
|
||||
# 'sys.frozen' is True when running from a PyInstaller executable.
|
||||
# We can either remove the variable or, more safely, restore the original
|
||||
# one if PyInstaller saved it. PyInstaller often saves it as LD_LIBRARY_PATH_ORIG.
|
||||
|
||||
Reference in New Issue
Block a user