vscode-dev-containers icon indicating copy to clipboard operation
vscode-dev-containers copied to clipboard

When trying to install featuer fish the installation of fisher fails (due to environment variables set by vscode?)

Open eitsupi opened this issue 3 years ago • 2 comments

I tried to install a ubuntu based container with feature: fish and it failed to install fisher and I got the following log. This only occurs at the place of work behind the corporate proxy and we have not obtained a reproducible example at home.

However, in the log I see the letters if test -e _vsc_install_jupyterlab="jupyterlab-debian.sh and if test -e ${_build_arg_jupyterlab_version:-latest}" which I believe are from vscode. Since I am not trying to install jupyter with this container, I am wondering if it has something to do with the environment variables that the extension automatically sets.

https://github.com/microsoft/vscode-dev-containers/blob/e914f1d084f763bfb4c38c8fbd6fb23e78be0765/script-library/container-features/src/feature-scripts.env#L25

It looks like this environment variable is passed to the following line in the fisher script: Remote-Containers extension automatically sets the environment variable named plugin?

https://github.com/jorgebucaran/fisher/blob/d431f45abcd89d6149a6b894a0a98ba02afa3703/functions/fisher.fish#L86

 > [stage-1 2/2] RUN cd /tmp/build-features/fish_1 && chmod +x ./install.sh && ./install.sh:
#0 0.581 (*) Script: fish-debian.sh
#0 0.625 Installing fish shell...
#0 6.647 Get:1 http://ppa.launchpad.net/fish-shell/release-3/ubuntu focal InRelease [17.6 kB]
#0 7.192 Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
#0 7.289 Get:3 http://ppa.launchpad.net/fish-shell/release-3/ubuntu focal/main amd64 Packages [1,130 B]
#0 7.727 Get:4 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
#0 8.939 Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
#0 10.15 Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
#0 15.21 Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2,047 kB]
#0 15.35 Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1,275 kB]
#0 16.01 Get:9 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [27.5 kB]
[2022-08-09T04:35:40.347Z] #0 19.89 Get:10 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [886 kB]
#0 25.78 Get:11 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [1,416 kB]
#0 34.71 Get:12 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
#0 57.46 Get:13 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
#0 58.31 Get:14 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
#0 67.85 Get:15 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,498 kB]
#0 68.86 Get:16 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [30.2 kB]
#0 74.88 Get:17 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [1,525 kB]
#0 79.19 Get:18 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,175 kB]
#0 80.22 Get:19 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [55.2 kB]
#0 80.93 Get:20 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [27.5 kB]
[2022-08-09T04:35:40.347Z] #0 80.97 Fetched 23.1 MB in 1min 15s (308 kB/s)
#0 80.97 Reading package lists...
#0 82.25 Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
#0 82.40 Hit:2 http://ppa.launchpad.net/fish-shell/release-3/ubuntu focal InRelease
#0 82.42 Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
#0 82.71 Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
#0 83.16 Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
#0 83.37 Reading package lists...
[2022-08-09T04:35:40.347Z] 
#0 84.15 Reading package lists...
#0 84.85 Building dependency tree...
#0 84.97 Reading state information...
#0 85.09 The following additional packages will be installed:
#0 85.09   gettext-base
[2022-08-09T04:35:40.347Z] #0 85.09 Suggested packages:
#0 85.09   xdg-utils
#0 85.09 Recommended packages:
[2022-08-09T04:35:40.347Z] #0 85.09   xsel
#0 85.11 The following NEW packages will be installed:
#0 85.11   fish gettext-base
#0 86.11 0 upgraded, 2 newly installed, 0 to remove and 18 not upgraded.
#0 86.11 Need to get 2,628 kB of archives.
[2022-08-09T04:35:40.347Z] #0 86.11 After this operation, 18.4 MB of additional disk space will be used.
#0 86.11 Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 gettext-base amd64 0.19.8.1-10build1 [50.2 kB]
#0 94.73 Get:2 http://ppa.launchpad.net/fish-shell/release-3/ubuntu focal/main amd64 fish amd64 3.5.1-1~focal [2,577 kB]
[2022-08-09T04:35:40.347Z] 
#0 95.84 Fetched 2,628 kB in 10s (270 kB/s)
#0 95.89 Selecting previously unselected package gettext-base.

#0 95.89 (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 50770 files and directories currently installed.)

#0 95.93 Preparing to unpack .../gettext-base_0.19.8.1-10build1_amd64.deb ...

[2022-08-09T04:35:40.348Z] #0 95.95 Unpacking gettext-base (0.19.8.1-10build1) ...

#0 96.04 Selecting previously unselected package fish.

#0 96.05 Preparing to unpack .../fish_3.5.1-1~focal_amd64.deb ...

#0 96.06 Unpacking fish (3.5.1-1~focal) ...

#0 96.47 Setting up gettext-base (0.19.8.1-10build1) ...

#0 96.49 Setting up fish (3.5.1-1~focal) ...

#0 96.54 Processing triggers for libc-bin (2.31-0ubuntu9.9) ...

#0 96.59 Processing triggers for man-db (2.9.1-1) ...

#0 96.70 Processing triggers for mime-support (3.64ubuntu1) ...

#0 96.79 fish, version 3.5.1
#0 96.79 Installing Fisher...
#0 97.19 install version
#0 97.21 Fetching
#0 97.21 fish: Missing end to balance this if statement
#0 97.21                     if test -e _vsc_install_jupyterlab="jupyterlab-debian.sh
#0 97.21                     ^
#0 97.21 fish: Missing end to balance this if statement
#0 97.21                     if test -e ${_build_arg_jupyterlab_version:-latest}"
#0 97.21                     ^
#0 97.84            /root/.config/fish/functions/fisher.fish
#0 97.84            /root/.config/fish/completions/fisher.fish
#0 97.84 
#0 97.85 
#0 97.85 Installed 3 plugin/s
#0 97.91 fish: Unknown command: fisher
#0 97.91 fish: 
#0 97.91 curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
#0 97.91

cc @andreiborisov

  • VSCode Version: 1.70.0
  • Local OS Version: Ubuntu 20.04
  • Local chip architecture: x86
  • Reproduces in: Remote - Containers (over Remote - SSH)
  • Name of Dev Container Definition with Issue: r

eitsupi avatar Aug 12 '22 15:08 eitsupi

Thanks for opening @eitsupi. I agree it'd be great to get @andreiborisov's eyes on this.

bamurtaugh avatar Sep 02 '22 20:09 bamurtaugh

Hi! I'm in the process of moving this into a separate feature according to the new spec, I'll look into this as soon, as I'll move it.

andreiborisov avatar Sep 02 '22 22:09 andreiborisov

@bamurtaugh @eitsupi I've published the feature independently: https://github.com/meaningful-ooo/devcontainer-features/tree/main/src/fish

I'm asking you to close the issue and reopen it in the new repo if the problem persists.

andreiborisov avatar Oct 11 '22 18:10 andreiborisov

Makes sense, going to close this here. Thanks so much for sharing and excited to see the new repo, @andreiborisov!

bamurtaugh avatar Oct 11 '22 18:10 bamurtaugh