diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-11-30 20:43:06 +0100 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-11-30 20:43:06 +0100 |
commit | b9b7dcdf001e1705ec45deab56d31eb74dcaaa4d (patch) | |
tree | 9b65f61b02b24cd162de3c3c23a7f0ab042e0472 /modules/mono/SCsub | |
parent | bf94eed60c010f54299b6241a47c639c010a3985 (diff) |
C#: Improve tool script support and fix reloading issues
Diffstat (limited to 'modules/mono/SCsub')
-rw-r--r-- | modules/mono/SCsub | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/modules/mono/SCsub b/modules/mono/SCsub index 0e5dd9b4cf..e1f5e2ef28 100644 --- a/modules/mono/SCsub +++ b/modules/mono/SCsub @@ -103,6 +103,16 @@ import os def find_nuget_unix(): + import os + + if 'NUGET_PATH' in os.environ: + hint_path = os.environ['NUGET_PATH'] + if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK): + return hint_path + hint_path = os.path.join(hint_path, 'nuget') + if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK): + return hint_path + import os.path import sys @@ -129,6 +139,16 @@ def find_nuget_unix(): def find_nuget_windows(): + import os + + if 'NUGET_PATH' in os.environ: + hint_path = os.environ['NUGET_PATH'] + if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK): + return hint_path + hint_path = os.path.join(hint_path, 'nuget.exe') + if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK): + return hint_path + import mono_reg_utils as monoreg mono_root = '' @@ -160,14 +180,6 @@ def find_nuget_windows(): if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK): return hint_path - if 'NUGET_PATH' in os.environ: - hint_path = os.environ['NUGET_PATH'] - if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK): - return hint_path - hint_path = os.path.join(hint_path, 'nuget.exe') - if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK): - return hint_path - return None |