-
Notifications
You must be signed in to change notification settings - Fork 24
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
ide wrapper bash script failing: #254
Comments
There is another bug in the This looks good:
But this does not:
So it seems we are loosing the newlines of the output if we send it into a variable. |
Was auto-closed by PR #255 but not all problems solved so reopening. |
@aBega2000 got a different error than me. Something like this
|
For the newlines it is as simple as this: So:
But:
So for this nothing needs to be done as @aBega2000 already quoted the variable correctly here: IDEasy/cli/src/main/package/bin/ide Line 18 in 970e1fc
|
If I understood correctly, when running A way to solve that could be this, in public void run() {
Collection<VariableLine> variables = this.context.getVariables().collectVariables();
for (VariableLine line : variables) {
if (this.context.getSystemInfo().isWindows()) {
line = normalizeWindowsValue(line);
+ if (line.getName().equals("PATH")) {
+ String lineValue = '"' + line.getValue() + '"';
+ line = line.withValue(lineValue);
}
}
this.context.info(line.toString());
}
} it solves the problem when running |
2 Questions: |
The quotes new appear and the
There are various
|
Expected behavior
As a IDEasy user, I want to set my environment variables using
ide
command so that I can work as simple as withdevon
CLI.Actual behavior
Steps to reproduce (bug) / Use Case of feature request (enhancement)
ide
wrapper scriptRelated/Dependent Issues
Comments/Hints:
According to my analysis the error seems to come from path entries with
Program Files (x86)
.My assumption is that we need to double quote the variable values at least for bash.
Affected version:
The text was updated successfully, but these errors were encountered: