Comments (4)
If I understand you correctly .\folder\script.cmd will get replaced to ./folder/script.cmd. But this shouldn't make a difference or did you get an error?
I'm absolute agree with you and that relative paths are useful. I really don't see the connection to the replacement of the slash with a backslash.
from idea-batch.
It says that it cannot find ".", but if you use backslash then it's extecuting the script. This is because of how cmd.exe parses the commands and Windows paths. So even if in Windows Explorer you can use slash or backslash in cmd.exe it might have different meaning.
from idea-batch.
This is actually related to my merge request on getting relative paths to work. I am trying to remember as it has been some time now, but there were issues where the script could not get run if it was using \
for some reason.
from idea-batch.
@blassmegod I do not see any issue after looking at the code. You do NOT want to put the period in the Script text field. Use the absolute path in the text field, and the plugin will automagically use relative paths if the absolute path given is inside the project.
When the script is located in the working directory, then only give the name of the script file in the Script text input, and then the path to the script in the working directory text input (as shown):
Because in this case the project folder is C:\Users\tlfal_000\Desktop\outside
the script will be run as .\dist\server_dist\run_server.bat
EDIT: You can confirm this by looking at the idea run config that is created for the task:
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="run_server" type="BatchConfigurationType" factoryName="Batch">
<module name="outside" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/dist/server_dist" />
<option name="PARENT_ENVS" value="true" />
<option name="SCRIPT_NAME" value="run_server.bat" />
<option name="PARAMETERS" value="" />
<method v="2" />
</configuration>
</component>
Take note of the use of `$PROJECT_DIR$ to make the path relative to the project.
from idea-batch.
Related Issues (20)
- Colours inherit from wrong language defaults
- IDEA 2019.2: java.lang.ClassNotFoundException: sun.reflect.Reflection PluginClassLoader HOT 19
- Plugin is not compatible with IntelliJ 2019.3 HOT 2
- The plugin is not compatible with IDEA 2019.1 HOT 1
- Red underlines after `if defined` HOT 1
- Cannot find stuff through Conda environment HOT 1
- Doesn't work in 2018.3.6 HOT 1
- Add `Line Comment`-Action HOT 13
- typing :: breaks the editor HOT 9
- Move command dont works HOT 2
- When using psql command, input prompt is not shown, and input does not work
- How to pass $ContentRoot$ or $ModuleName$ to .bat HOT 1
- make "control+/" do block comments like in python HOT 1
- Is there a way to enable ansi colors in output?
- Remove Spaces from Plugin id HOT 4
- Consistent icon
- Error at startup with Intellij 2021.3 EAP HOT 7
- Chinese garbled code when run a bat file on window 10
- %ERRORLEVEL% doesn't color correctly / isn't recognized
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from idea-batch.