Giter Site home page Giter Site logo

Comments (7)

esc avatar esc commented on July 26, 2024

Can you expand on this a little, not sure exactly what you mean?

from afp-cli.

mriehl avatar mriehl commented on July 26, 2024

I think the problem is cli looks at os.name to detect the suitable export format instead of being shell specific.

Same for spawning a subshell.

from afp-cli.

matey-jack avatar matey-jack commented on July 26, 2024

yes, exactly. I looked for ways to detect if bash is there, but windows doesn't have the SHELL env variable (or at least with gitbash it's not there) and no other env variable gives a clue.
I have thought about searching PATH for bash, but not looked into the details and drawbacks of this approach.

Currently our usecase disappeared, which is why I am not working on it any more.

from afp-cli.

esc avatar esc commented on July 26, 2024

As a workaround, we could define a config-file parameter to force the export format regardless of os.name .. Not perfect, but would put the user in control.

On 2 December 2015 18:02:36 CET, Robert Jack Will [email protected] wrote:

yes, exactly. I looked for ways to detect if bash is there, but windows
doesn't have the SHELL env variable (or at least with gitbash it's not
there) and no other env variable gives a clue.
I have thought about searching PATH for bash, but not looked into the
details and drawbacks of this approach.

Currently our usecase disappeared, which is why I am not working on it
any more.


Reply to this email directly or view it on GitHub:
#26 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

from afp-cli.

sdomme avatar sdomme commented on July 26, 2024

Maybe there is a way to get it from the hidden variable CMDCMDLINE.

echo %CmdCmdLine%
"C:\Windows\system32\cmd.exe"

I'm done with Windows so can't test it.

from afp-cli.

esc avatar esc commented on July 26, 2024

there should be an override switch (and config-file option), like -f, --force-os that allows you to disregard any automatic detection of the operating system. Should be trivial enough to implement.

from afp-cli.

schlomo avatar schlomo commented on July 26, 2024

If the user wants to set the shell (bash, zsh, CMD.EXE ...) then why not give a parameter and config file item for just that? In the end the shell type determines how we have to call it and inject the variables.

from afp-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.