Skip to content

build: fix devserver sh_binary not working on systems with runfiles enabled #23721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tools/dev-server/launcher_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/
{ echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
# --- end runfiles.bash initialization v2 ---

# If we do not run the devserver as part of a test, we always enforce runfile
# resolution when invoking the devserver NodeJS binary. This is necessary as
# runfile trees are disabled as part of this repository. The devserver NodeJS
# binary would not find a relative runfile tree directory and error out.
if [[ -z "${TEST_SRCDIR:-""}" ]]; then
export RUNFILES_MANIFEST_ONLY="1"
fi

# Resolve the path of the dev-server binary. Note: usually we either need to
# resolve the "nodejs_binary" executable with different file extensions on
# windows, but since we already run this launcher as part of a "sh_binary", we
Expand Down