mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
vscode: don't break when profile name has spaces
This commit is contained in:
parent
0a5a165aca
commit
1c75dd7022
1 changed files with 1 additions and 1 deletions
|
|
@ -459,7 +459,7 @@ in
|
||||||
existing_profiles=$(jq '.userDataProfiles // [] | map({ (.name): .location }) | add // {}' "$file")
|
existing_profiles=$(jq '.userDataProfiles // [] | map({ (.name): .location }) | add // {}' "$file")
|
||||||
|
|
||||||
for profile in "''${profiles[@]}"; do
|
for profile in "''${profiles[@]}"; do
|
||||||
if [[ "$(echo $existing_profiles | jq --arg profile $profile 'has ($profile)')" != "true" ]] || [[ "$(echo $existing_profiles | jq --arg profile $profile 'has ($profile)')" == "true" && "$(echo $existing_profiles | jq --arg profile $profile '.[$profile]')" != "\"$profile\"" ]]; then
|
if [[ "$(echo $existing_profiles | jq --arg profile "$profile" 'has ($profile)')" != "true" ]] || [[ "$(echo $existing_profiles | jq --arg profile "$profile" 'has ($profile)')" == "true" && "$(echo $existing_profiles | jq --arg profile "$profile" '.[$profile]')" != "\"$profile\"" ]]; then
|
||||||
file_write="$file_write$([ "$file_write" != "" ] && echo "...")$profile"
|
file_write="$file_write$([ "$file_write" != "" ] && echo "...")$profile"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue