Skip to content
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

Default to standard code behaviour when outside a container #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ if $add_new_window ; then
new_args+=("--new-window")
fi

# If we're not running inside toolbox, default to normal 'code' binary
if [ ! -f /run/.containerenv ] ; then
exec flatpak run --command=code com.visualstudio.code "$@"
fi

flatpak="flatpak-spawn --host flatpak"
# shellcheck disable=SC1091,SC2154
container_name="$(. /run/.containerenv && echo "$name")"
Expand Down