datacontract-cli icon indicating copy to clipboard operation
datacontract-cli copied to clipboard

Readme shows bash commands only

Open PYaDo opened this issue 9 months ago • 2 comments

While i was working thorugh setting up a docker container via Powershell i noticed the commands in the README.md are specific to bash: https://github.com/datacontract/datacontract-cli/blob/f219ef5b68776a64b3b03e1d0aa826ac50b3a3b3/README.md?plain=1#L196-L200

Using the bash-commands in powershell obviously results in an error:

alias datacontract='docker run -v "${PWD}:/home/datacontract" datacontract/cli:latest'
alias : Dieser Befehl kann keinen übereinstimmenden Alias finden, da kein Alias mit name "datacontract=docker run -v
"${PWD}:/home/datacontract" datacontract/cli:latest" vorhanden ist.
In Zeile:1 Zeichen:1
+ alias datacontract='docker run -v "${PWD}:/home/datacontract" datacon ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (datacontract=do...ract/cli:latest:String) [Get-Alias], ItemNotFoundExce
   ption
    + FullyQualifiedErrorId : ItemNotFoundException,Microsoft.PowerShell.Commands.GetAliasCommand

While the bash-command in the README.md is neither wrong nor incolplete, i would have appreciated a hint on the precondition to use bash.

Alternativeley a note how to create an alias while using powershell would be beneficial:

function datacontract {
    docker run --rm -v "${PWD}:/home/datacontract" datacontract/cli:latest @args
}

# Example usage to show version:
datacontract --version

PYaDo avatar May 08 '25 13:05 PYaDo

Let's start by making it clearer that the setup works for bash. Do you have the capacity to create a PR for that?

simonharrer avatar May 08 '25 15:05 simonharrer

I will look into that - would be my first.

PYaDo avatar May 09 '25 06:05 PYaDo

stale

jochenchrist avatar Aug 02 '25 18:08 jochenchrist