Skip to content

Commit

Permalink
Fix for VSCode, fish and byobu installations
Browse files Browse the repository at this point in the history
I've detected on my local installation that this line of code is breaking when my VSCode startups up from the Unity bar (or Gnome Dock).
  • Loading branch information
morhook committed Oct 21, 2022
1 parent bfb7a76 commit f917d21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion usr/bin/byobu-launcher-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ install_launcher() {

install_launcher_fish() {
$PKG-launcher-uninstall "$1" || true
printf "status --is-login; and status --is-interactive; and exec byobu-launcher" >> "$1"
printf "if not set -q VSCODE_CWD" >> "$1"
printf " status --is-login; and status --is-interactive; and exec byobu-launcher" >> "$1"
printf "end" >> "$1"
}

# Sanitize the environment
Expand Down

2 comments on commit f917d21

@e-t
Copy link

@e-t e-t commented on f917d21 Jan 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using printf, you have to supply your own newlines with \n (consider the install_launcher command just above). Without newlines, you end up with this: if not set -q VSCODE_CWD status --is-login; and status --is-interactive; and exec byobu-launcherend which is not valid fish syntax. Alternately, adding semicolons to yield if not set -q VSCODE_CWD; status --is-login; and status --is-interactive; and exec byobu-launcher; end would also be valid.

@dustinkirkland
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, just committed a fix.

Please sign in to comment.