diff options
author | Dominic Hofer <6570912+dominichofer@users.noreply.github.com> | 2024-08-09 22:27:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-09 13:27:07 -0700 |
commit | da33c12ad4d70c39dce99885c64bb755d6fce2e6 (patch) | |
tree | 60fa819016a2e8dec658f492d9b395d3f4990f5b /lib | |
parent | c30979ed6672cf20e32fb889e4d6b184c0c940fc (diff) | |
download | spack-da33c12ad4d70c39dce99885c64bb755d6fce2e6.tar.gz spack-da33c12ad4d70c39dce99885c64bb755d6fce2e6.tar.bz2 spack-da33c12ad4d70c39dce99885c64bb755d6fce2e6.tar.xz spack-da33c12ad4d70c39dce99885c64bb755d6fce2e6.zip |
Remove execution permission from setup-env.sh (#45641)
`setup-env.sh` is meant to be sourced, not executed directly.
By revoking execution permissions, users who accidentally execute
the script will receive an error instead of seeing no effect.
* Remove execution permission from `setup-env.sh` and friends
* Don't make output file executable in `spack commands --update-completion`
---------
Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/commands.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/spack/spack/cmd/commands.py b/lib/spack/spack/cmd/commands.py index f9979339ed..c6e775dd43 100644 --- a/lib/spack/spack/cmd/commands.py +++ b/lib/spack/spack/cmd/commands.py @@ -11,7 +11,6 @@ import sys from argparse import ArgumentParser, Namespace from typing import IO, Any, Callable, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Union -import llnl.util.filesystem as fs import llnl.util.tty as tty from llnl.util.argparsewriter import ArgparseRstWriter, ArgparseWriter, Command from llnl.util.tty.colify import colify @@ -867,9 +866,6 @@ def _commands(parser: ArgumentParser, args: Namespace) -> None: prepend_header(args, f) formatter(args, f) - if args.update_completion: - fs.set_executable(args.update) - else: prepend_header(args, sys.stdout) formatter(args, sys.stdout) |