Unset CDPATH when running admin/configure in README#337
Open
agis wants to merge 1 commit intometabrainz:masterfrom
Open
Unset CDPATH when running admin/configure in README#337agis wants to merge 1 commit intometabrainz:masterfrom
CDPATH when running admin/configure in README#337agis wants to merge 1 commit intometabrainz:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the installation instructions to avoid CDPATH-related stdout from cd breaking admin/configure on systems where CDPATH is set, improving reliability of the documented setup flow.
Changes:
- Prefixes the
admin/configure with alt-db-only-mirrorREADME command withCDPATH=to neutralizeCDPATHfor that invocation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
On systems that set the CDPATH environment variable[1], cd might print
the directory to stdout:
If cd uses a non-empty directory name from CDPATH, or if -
is the first argument, and the directory change is
successful, cd writes the absolute pathname of the new
working directory to the standard output.
This causes admin/lib/common.inc.bash to erroneously set MB_DOCKER_ROOT
to `$'/home/musicbrainz-docker\n/home/musicbrainz-docker', which in turn
causes the following error:
$ admin/configure with alt-db-only-mirror
admin/lib/common.inc.bash: line 12: cd: $'/home/musicbrainz-docker\n/home/musicbrainz-docker': No such file or directory
configure: fail to change directory to '/home/musicbrainz-docker
/home/musicbrainz-docker'
By temporarily unsetting CDPATH (just in case the user has set it), the
command succeeds in my system.
[1] https://man7.org/linux/man-pages/man1/bash.1.html
1f98e5a to
6f9b192
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On systems that set the CDPATH environment variable[1], cd might print the directory to stdout:
This causes admin/lib/common.inc.bash to erroneously set MB_DOCKER_ROOT to `$'/home/musicbrainz-docker\n/home/musicbrainz-docker', which in turn causes the following error:
By temporarily unsetting CDPATH (just in case the user has set it), the command succeeds in my system.
[1] https://man7.org/linux/man-pages/man1/bash.1.html