diff options
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 |