Git Product home page Git Product logo

Comments (3)

hohwille avatar hohwille commented on August 24, 2024

The problem is that *.bat script logic is so limited (or in other words such a pile of crap) that I can not properly filter the path to remove any previous entries from a devon-ide.
Thus for simplicity I decided to save a backup of the previous PATH in DEVON_OLD_PATH so that I can reset the PATH.
Hence, I think I need to unset the PATH and DEVON_OLD_PATH before switching from windows CMD world to bash world. Afterwards I might need to reset it.
Further, on windows there is git bash that uses the same home directory as windows is using while there is also cygwin that uses a separate home directory. When calling the scripts for the first time (on setup) this might be the first time that devon-ide comes to the system at all. Hence devon CLI is not yet installed and available. Therefore I can not call bash with -c 'devon %*' as devon has to be installed first. I could provide the absolute path to the devon bash script from the devon.bat script but I shall not change PWD/CWD as some commands require to be called in the current directory. Not can I provide an absolute path as I only know the Windows path (e.g. C:\projects\my-ide\scripts\devon) but would need to transform it to a unix path and that will differ per Bash (/c/projects/my-ide/scripts/devon vs. /cygdrive/c/my-ide/scripts/devon). I would like to keep things simple, robust and reliable. But this windows crap is really making it much more tricky than expected...

from ide.

hohwille avatar hohwille commented on August 24, 2024

KISS would be to drop *.bat support at all. But convincing all windows users to use bash instead sounds like a relegious act that I am not keen on either.

from ide.

Daer7 avatar Daer7 commented on August 24, 2024

Hi @hohwille, I experienced a similar problem in the newest version of the framework when running Git Bash from the IntelliJ shipped with devon. Upon starting the shell my .bashrc executes source ~/.devon/devon and I end up with a weird PATH being a mixture of bash-style and Windows-style entries like so:

<DEVON-HOME>/software/vscode/bin:<DEVON-HOME>/software/tomcat/bin:<DEVON-HOME>/software/sqlplus:<DEVON-HOME>/software/python:<DEVON-HOME>/software/project-ide-scripts:<DEVON-HOME>/software/node:<DEVON-HOME>/software/mvn/bin:<DEVON-HOME>/software/java/bin:<DEVON-HOME>/software/intellij/bin:<DEVON-HOME>/software/helm:<DEVON-HOME>/software/eclipse:C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\<MYUSERNAME>\bin;C:\Program Files\Eclipse Adoptium\jdk-19.0.2.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PuTTY;C:\Program Files\Git\cmd;C:\Program Files\NVM;C:\Program Files\nodejs;C:\Program Files\Rancher Desktop\resources\resources\win32\bin;C:\Program Files\Rancher Desktop\resources\resources\linux\bin;C:\Program Files\nodejs;C:\Users\<MYUSERNAME>\AppData\Local\Microsoft\WindowsApps;C:\Users\<MYUSERNAME>\scripts;C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.1\bin;C:\skaffold

Strangely, unix-like tools like ls, tail got removed (no entries such as /mingw64/bin:/usr/local/bin:/usr/bin:/bin in the PATH anymore), so what gets printed on top of my terminal window with Git Bash before the command prompt appears is:

bash: tail: command not found
bash: wc: command not found
bash: test: : integer expression expected
devonfw-ide environment variables have been set for <DEVON-HOME> in workspace main
...
$

This shell becomes thus unusable. My workaround for now (without analysing in detail) is to comment out the lines manipulating DEVON_OLD_PATH which seem to be the problem in my case.


devon version 2024.01.001
OS: Windows 11 Pro 10.0.22631 Build 22631

from ide.

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.