mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
shellcheck fix: tests/functional/nix-copy-ssh-common.sh
This commit is contained in:
parent
83e203fe45
commit
c9fd721be9
2 changed files with 8 additions and 8 deletions
|
|
@ -106,7 +106,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
excludes = [
|
excludes = [
|
||||||
# We haven't linted these files yet
|
# We haven't linted these files yet
|
||||||
''^tests/functional/nix-copy-ssh-common\.sh$''
|
|
||||||
''^tests/functional/nix-copy-ssh-ng\.sh$''
|
''^tests/functional/nix-copy-ssh-ng\.sh$''
|
||||||
''^tests/functional/nix-copy-ssh\.sh$''
|
''^tests/functional/nix-copy-ssh\.sh$''
|
||||||
''^tests/functional/nix-daemon-untrusting\.sh$''
|
''^tests/functional/nix-daemon-untrusting\.sh$''
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
# shellcheck shell=bash
|
||||||
proto=$1
|
proto=$1
|
||||||
shift
|
shift
|
||||||
(( $# == 0 ))
|
(( $# == 0 ))
|
||||||
|
|
@ -7,7 +8,7 @@ TODO_NixOS
|
||||||
clearStore
|
clearStore
|
||||||
clearCache
|
clearCache
|
||||||
|
|
||||||
mkdir -p $TEST_ROOT/stores
|
mkdir -p "$TEST_ROOT"/stores
|
||||||
|
|
||||||
# Create path to copy back and forth
|
# Create path to copy back and forth
|
||||||
outPath=$(nix-build --no-out-link dependencies.nix)
|
outPath=$(nix-build --no-out-link dependencies.nix)
|
||||||
|
|
@ -37,17 +38,17 @@ if [[ "$proto" == "ssh-ng" ]]; then
|
||||||
args+=(--no-check-sigs)
|
args+=(--no-check-sigs)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -f ${remoteRoot}${outPath}/foobar ]
|
[ ! -f "${remoteRoot}""${outPath}"/foobar ]
|
||||||
nix copy "${args[@]}" --to "$remoteStore" $outPath
|
nix copy "${args[@]}" --to "$remoteStore" "$outPath"
|
||||||
[ -f ${remoteRoot}${outPath}/foobar ]
|
[ -f "${remoteRoot}""${outPath}"/foobar ]
|
||||||
|
|
||||||
# Copy back from store
|
# Copy back from store
|
||||||
|
|
||||||
clearStore
|
clearStore
|
||||||
|
|
||||||
[ ! -f $outPath/foobar ]
|
[ ! -f "$outPath"/foobar ]
|
||||||
nix copy --no-check-sigs --from "$remoteStore" $outPath
|
nix copy --no-check-sigs --from "$remoteStore" "$outPath"
|
||||||
[ -f $outPath/foobar ]
|
[ -f "$outPath"/foobar ]
|
||||||
|
|
||||||
# Check --substitute-on-destination, avoid corrupted store
|
# Check --substitute-on-destination, avoid corrupted store
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue