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

Conversation

brunoborges
Copy link

No description provided.

Signed-off-by: Bruno Borges <[email protected]>
@@ -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.

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

Successfully merging this pull request may close these issues.

4 participants