summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/spack b/bin/spack
index 9d8e0419ad..7e2e7e06de 100755
--- a/bin/spack
+++ b/bin/spack
@@ -59,6 +59,8 @@ if 'ruamel.yaml' in sys.modules:
if 'ruamel' in sys.modules:
del sys.modules['ruamel']
-# Once we've set up the system path, run the spack main method
import spack.main # noqa
-sys.exit(spack.main.main())
+
+# Once we've set up the system path, run the spack main method
+if __name__ == "__main__":
+ sys.exit(spack.main.main())