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>
This commit is contained in:
parent
cc47ee3984
commit
246eeb2b69
7 changed files with 0 additions and 4 deletions
|
@ -11,7 +11,6 @@
|
|||
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)
|
||||
|
|
0
share/spack/setup-env.csh
Executable file → Normal file
0
share/spack/setup-env.csh
Executable file → Normal file
0
share/spack/setup-env.fish
Executable file → Normal file
0
share/spack/setup-env.fish
Executable file → Normal file
0
share/spack/setup-env.sh
Executable file → Normal file
0
share/spack/setup-env.sh
Executable file → Normal file
0
share/spack/setup-tutorial-env.sh
Executable file → Normal file
0
share/spack/setup-tutorial-env.sh
Executable file → Normal file
0
share/spack/spack-completion.bash
Executable file → Normal file
0
share/spack/spack-completion.bash
Executable file → Normal file
0
share/spack/spack-completion.fish
Executable file → Normal file
0
share/spack/spack-completion.fish
Executable file → Normal file
Loading…
Reference in a new issue