We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
OWD
APPIMAGE_EXTRACT_AND_RUN=1
See lalten/rules_appimage#156
To reproduce:
cd `mktemp -d` echo 'bazel_dep(name="rules_appimage", version="1.8.0")' > MODULE.bazel cat <<'EOF' >BUILD load("@rules_appimage//appimage:appimage.bzl", "appimage") sh_binary( name = "test_sh", srcs = ["test.sh"], ) appimage( name = "test.appimage", binary = ":test_sh", ) EOF cat <<'EOF' >test.sh #!/bin/bash pwd env | sort EOF chmod +x test.sh bazel build //:test.appimage
I've attached the resulting test.appimage: test.appimage.tar.gz
❯ env -i -- PATH="/bin" bazel-bin/test.appimage /tmp/.mount_test.aIPOIGM/test_sh.runfiles/_main APPDIR=/tmp/.mount_test.aIPOIGM APPIMAGE=/home/user/.cache/bazel/_bazel_user/5f48ff965103b174f3c248651ebad24d/execroot/_main/bazel-out/k8-fastbuild/bin/test.appimage ARGV0=bazel-bin/test.appimage BUILD_WORKING_DIRECTORY=/home/user/repo OLDPWD=/home/user/repo OWD=/home/user/repo PATH=/bin PWD=/tmp/.mount_test.aIPOIGM/test_sh.runfiles/_main RUNFILES_DIR=/tmp/.mount_test.aIPOIGM/test_sh.runfiles SHLVL=1 TMPDIR=/tmp _=/bin/env
❯ env -i -- PATH="/bin" APPIMAGE_EXTRACT_AND_RUN=1 bazel-bin/test.appimage /tmp/appimage_extracted_065248ba50a9cbfc7dc25b7b2eaffc36/test_sh.runfiles/_main APPDIR=/tmp/appimage_extracted_065248ba50a9cbfc7dc25b7b2eaffc36 APPIMAGE=/home/user/.cache/bazel/_bazel_user/5f48ff965103b174f3c248651ebad24d/execroot/_main/bazel-out/k8-fastbuild/bin/test.appimage APPIMAGE_EXTRACT_AND_RUN=1 ARGV0=bazel-bin/test.appimage BUILD_WORKING_DIRECTORY= OLDPWD=/home/user/repo PATH=/bin PWD=/tmp/appimage_extracted_065248ba50a9cbfc7dc25b7b2eaffc36/test_sh.runfiles/_main RUNFILES_DIR=/tmp/appimage_extracted_065248ba50a9cbfc7dc25b7b2eaffc36/test_sh.runfiles SHLVL=1 TMPDIR=/tmp _=/bin/env
you can see the OWD variable from
type2-runtime/src/runtime/runtime.c
Line 1710 in 9594e2b
It probably also makes sense to prefix the env var with APPIMAGE_ but that's a different issue.
The text was updated successfully, but these errors were encountered:
BUILD_WORKING_DIRECTORY
Thanks for pointing this out @lalten. Would you be willing to send a pull request? Thanks.
Sorry, something went wrong.
No branches or pull requests
See lalten/rules_appimage#156
To reproduce:
I've attached the resulting test.appimage:
test.appimage.tar.gz
you can see the
OWD
variable fromtype2-runtime/src/runtime/runtime.c
Line 1710 in 9594e2b
It probably also makes sense to prefix the env var with APPIMAGE_ but that's a different issue.
The text was updated successfully, but these errors were encountered: