We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
realpath
1 parent 1f2f362 commit bef18c7Copy full SHA for bef18c7
src/nixos-anywhere.sh
@@ -201,7 +201,7 @@ parseArgs() {
201
abort "Unknown hardware config backend: $2"
202
;;
203
esac
204
- hardwareConfigPath="$(realpath "$3")"
+ hardwareConfigPath=$3
205
shift
206
207
@@ -569,6 +569,8 @@ generateHardwareConfig() {
569
570
# to make sure nix knows about the new file
571
if command -v git >/dev/null; then
572
+ # handle relative paths
573
+ hardwareConfigPath="$(realpath "$hardwareConfigPath")"
574
pushd "$(dirname "$hardwareConfigPath")"
575
if git rev-parse --is-inside-work-tree >/dev/null; then
576
git add --intent-to-add --force -- "$hardwareConfigPath"
0 commit comments