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

Fix Windows installation #152

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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ podman pull quay.io/konveyor/kantra:latest && podman run --name kantra-download

### Windows

```sh
podman pull quay.io/konveyor/kantra:latest && podman run --name kantra-download quay.io/konveyor/kantra:latest 1> /dev/null 2> /dev/null && podman cp kantra-download:/usr/local/bin/windows-kantra kantra && podman rm kantra-download
```powershell

Choose a reason for hiding this comment

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

&& is legal in cmd.exe but not in PowerShell.

Rather, in powershell, it would be:

podman pull quay.io/konveyor/kantra:latest ; podman run --name kantra-download quay.io/konveyor/kantra:latest ; podman cp kantra-download:/usr/local/bin/windows-kantra kantra.exe ; podman rm kantra-download

Copy link
Member

Choose a reason for hiding this comment

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

@brunoborges Could you update this and we can get it merged. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

&& is valid in PowerShell Core (pwsh, "modern" PowerShell), but not Windows PowerShell, in case this helps explain what's going on here.

; is a reasonable compromise for compatibility, although:

  • It won't stop when a command fails. This can make things a bit confusing if someone reads the logs from the bottom up after a failure.
  • It doesn't work with cmd. If it's made clear in the rendered readme that this is for PowerShell and not cmd (and perhaps also provide a one liner for cmd?), maybe that's fine.

I don't know of a good, universal solution, unfortunately.

podman pull quay.io/konveyor/kantra:latest && podman run --name kantra-download quay.io/konveyor/kantra:latest && podman cp kantra-download:/usr/local/bin/windows-kantra kantra.exe && podman rm kantra-download
```

---
Expand Down
Loading