diff options
Diffstat (limited to 'nixops/scripts')
-rwxr-xr-x | nixops/scripts/with_env | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nixops/scripts/with_env b/nixops/scripts/with_env index 26e74b5..9882f78 100755 --- a/nixops/scripts/with_env +++ b/nixops/scripts/with_env | |||
@@ -1,7 +1,7 @@ | |||
1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
2 | 2 | ||
3 | if [ -z "$NIXOPS" ]; then | 3 | if [ -z "$NIXOPS_ENV_LOADED" ]; then |
4 | echo "Please set NIXOPS to the nixops command" | 4 | echo "Please load the environment with direnv" |
5 | exit 1; | 5 | exit 1; |
6 | fi | 6 | fi |
7 | 7 | ||
@@ -10,7 +10,7 @@ chmod go-rwx $TEMP | |||
10 | 10 | ||
11 | finish() { | 11 | finish() { |
12 | rm -rf "$TEMP" | 12 | rm -rf "$TEMP" |
13 | $NIXOPS set-args --unset privateFiles | 13 | nixops set-args --unset privateFiles |
14 | } | 14 | } |
15 | 15 | ||
16 | trap finish EXIT | 16 | trap finish EXIT |
@@ -21,6 +21,6 @@ files=$(pass ls Nixops/files | sed -e '1d' -e 's/^.* //') | |||
21 | for file in $files; do | 21 | for file in $files; do |
22 | pass show "Nixops/files/$file" > $TEMP/$file | 22 | pass show "Nixops/files/$file" > $TEMP/$file |
23 | done | 23 | done |
24 | $NIXOPS set-args --argstr privateFiles "$TEMP" | 24 | nixops set-args --argstr privateFiles "$TEMP" |
25 | 25 | ||
26 | "$@" | 26 | "$@" |