-n => != ""

This commit is contained in:
zimbatm 2020-08-25 18:56:36 +02:00
parent 07dda1e608
commit 967d234ad8
No known key found for this signature in database
GPG Key ID: 71BAF6D40C1D63D7

View File

@ -10,7 +10,7 @@ add_config "max-jobs = auto"
# Allow binary caches for runner user # Allow binary caches for runner user
add_config "trusted-users = root runner" add_config "trusted-users = root runner"
# Append extra nix configuration if provided # Append extra nix configuration if provided
if [[ -n $INPUT_EXTRA_NIX_CONFIG ]]; then if [[ $INPUT_EXTRA_NIX_CONFIG != "" ]]; then
add_config "$INPUT_EXTRA_NIX_CONFIG" add_config "$INPUT_EXTRA_NIX_CONFIG"
fi fi
@ -22,7 +22,7 @@ installer_options=(
--nix-extra-conf-file /tmp/nix.conf --nix-extra-conf-file /tmp/nix.conf
) )
if [[ $INPUT_SKIP_ADDING_NIXPKGS_CHANNEL = "true" || -n $INPUT_NIX_PATH ]]; then if [[ $INPUT_SKIP_ADDING_NIXPKGS_CHANNEL = "true" || $INPUT_NIX_PATH != "" ]]; then
installer_options+=(--no-channel-add) installer_options+=(--no-channel-add)
else else
INPUT_NIX_PATH="/nix/var/nix/profiles/per-user/root/channels" INPUT_NIX_PATH="/nix/var/nix/profiles/per-user/root/channels"
@ -46,6 +46,6 @@ fi
echo "::add-path::/nix/var/nix/profiles/per-user/runner/profile/bin" echo "::add-path::/nix/var/nix/profiles/per-user/runner/profile/bin"
echo "::add-path::/nix/var/nix/profiles/default/bin" echo "::add-path::/nix/var/nix/profiles/default/bin"
if [[ -n $INPUT_NIX_PATH ]]; then if [[ $INPUT_NIX_PATH != "" ]]; then
echo "::set-env name=NIX_PATH::${INPUT_NIX_PATH}" echo "::set-env name=NIX_PATH::${INPUT_NIX_PATH}"
fi fi