Skip to content

Commit 4de46a6

Browse files
committed
chore: linux exception
1 parent b55395f commit 4de46a6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Tools/Package.nu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
def get-ue-install-dirs [] {
2+
if (sys host | get name) != "Windows" {
3+
print "Automatic unreal detection only supported on Windows"
4+
print "Please specify the --ue-install-dir option"
5+
exit 1
6+
}
7+
28
let eng_reg_version_keys = ^reg.exe query 'HKLM\SOFTWARE\EpicGames\Unreal Engine' | str trim | lines;
39
$eng_reg_version_keys | each {|key|
410
^reg.exe query $key /v 'InstalledDirectory' | str trim | lines | get 1 | str trim | split column ' ' key type value | get value
@@ -15,8 +21,8 @@ def get-ue-os [] {
1521
}
1622
}
1723

18-
def main [] {
19-
let install_dirs = get-ue-install-dirs;
24+
def main [--ue-install-dir: string] {
25+
let install_dirs = if $ue_install_dir != null { [$ue_install_dir] } else { get-ue-install-dirs };
2026
let plugin_dir = $env.FILE_PWD | path join '..' | path expand;
2127
let dist_dir = [$plugin_dir, 'Dist'] | path join;
2228
mkdir $dist_dir;

0 commit comments

Comments
 (0)