microsoft / microsoft/vscode-remote-release

Unable to pass paratmers to file in dotfile install command

Open
#3,047 5 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

containers feature-request
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version:
  • Local OS Version:
  • Remote OS Version:
    For all the above -
    Version: 1.45.1 (user setup)
    Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
    Date: 2020-05-14T08:27:35.169Z
    Electron: 7.2.4
    Chrome: 78.0.3904.130
    Node.js: 12.8.1
    V8: 7.8.279.23-electron.0
    OS: Windows_NT x64 10.0.19041
  • Remote Extension/Connection Type: SSH/Docker/WSL: docker (devcontainer)

Steps to Reproduce:

  1. In dotfile install command pass parameter to the file like ~/dotfiles/install.sh force (force is the argument)
  2. Dotfile execution fails as it says the file is not executable
[9987 ms] Start: Run in container: # Clone & install dotfiles
[11573 ms] ~/dotfiles/install.sh force not executable
[11573 ms] Cloning into '/home/vscode/dotfiles'...
/bin/sh: 39: [: ~/dotfiles/install.sh: unexpected operator

The issue seems to be with this line in dotfiles.ts.

[ -x filepah ] returns true only if the filepath exists and is executable. I couldn't make it work with filepath having the arguments to file. I have no idea if there is some shell magic to make it work.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/common/dotfiles.ts at the linked line and reproduce the dotfile install command in a Docker devcontainer with an argument such as force. Check how the executable test handles the file path and its parameters; done means the command accepts parameters without reporting the dotfile as non-executable.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell, typescript, vscode
Domain
devops, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.