Thanks to visit codestin.com
Credit goes to github.com

Skip to content

install.sh --dry-run prints misleading output #2356

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

Closed
dwahler opened this issue Jun 15, 2022 · 2 comments · Fixed by #2751
Closed

install.sh --dry-run prints misleading output #2356

dwahler opened this issue Jun 15, 2022 · 2 comments · Fixed by #2751
Assignees
Labels
api Area: HTTP API
Milestone

Comments

@dwahler
Copy link
Contributor

dwahler commented Jun 15, 2022

The documentation for install.sh suggests passing the --dry-run option to see what commands will be run. But if you do this, the output makes it look as though the package was actually installed:

coder@feature-bash:~$ curl -L https://coder.com/install.sh | sh -s -- --dry-run
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 13259  100 13259    0     0  49473      0 --:--:-- --:--:-- --:--:-- 49473
Ubuntu 20.04.4 LTS
Installing v0.6.6 of the amd64 deb package from GitHub.

+ mkdir -p ~/.cache/coder
+ curl -#fL -o ~/.cache/coder/coder_0.6.6_amd64.deb.incomplete -C - https://github.com/coder/coder/releases/download/v0.6.6/coder_0.6.6_linux_amd64.deb
+ mv ~/.cache/coder/coder_0.6.6_amd64.deb.incomplete ~/.cache/coder/coder_0.6.6_amd64.deb
+ sudo dpkg -i ~/.cache/coder/coder_0.6.6_amd64.deb

deb package has been installed.

To run Coder as a system service:

  # Configure the PostgreSQL database for Coder
  sudo vim /etc/coder.d/coder.env
  # Have systemd start Coder now and restart on boot
  sudo systemctl enable --now coder

Or, run a temporary deployment (all data is in-memory
and destroyed on exit):

  coder server --dev

We should make it clearer that these are the commands that would have been run, and that no changes were actually made.

@ketang
Copy link
Contributor

ketang commented Jun 30, 2022

What does the end result look like?

@dwahler
Copy link
Contributor Author

dwahler commented Jun 30, 2022

This is what the output looks like now, on Ubuntu:

Ubuntu 20.04.4 LTS
Running with --dry-run; the following are the commands that would be run if this were a real installation:

Installing v0.7.6 of the amd64 deb package from GitHub.

+ mkdir -p ~/.cache/coder
+ curl -#fL -o ~/.cache/coder/coder_0.7.6_amd64.deb.incomplete -C - https://github.com/coder/coder/releases/download/v0.7.6/coder_0.7.6_linux_amd64.deb
+ mv ~/.cache/coder/coder_0.7.6_amd64.deb.incomplete ~/.cache/coder/coder_0.7.6_amd64.deb
+ sudo dpkg --force-confdef --force-confold -i ~/.cache/coder/coder_0.7.6_amd64.deb

Dry-run complete.

To install Coder, re-run this script without the --dry-run flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants