-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fixes #337 - Command fix for project path with spaces #355
base: main
Are you sure you want to change the base?
Fixes #337 - Command fix for project path with spaces #355
Conversation
Fix added for the command with space in dir.
src/util/commandUtils.ts
Outdated
|
||
import * as Path from "path"; | ||
import * as vscode from "vscode"; | ||
import { isWin,mvnCmd,gradleCmd } from "../liberty/devCommands"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the need to import methods isWin
, mvnCmd
and gradleCmd
in commandUtils
. These methods are never used in devCommands
and elsewhere in the project. So in my suggestion you can remove these methods from devCommands
and keep it in commandUtils
. This can reduce one unnecessary import and improve performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment incorporated. Moved unused methods from devCommands to commandUtils and removed import.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Thanks
* https://github.com/microsoft/vscode-maven/blob/main/src/mavenTerminal.ts | ||
*/ | ||
function currentWindowsShell(): ShellType { | ||
const currentWindowsShellPath: string = vscode.env.shell; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this return? Is it the default terminal or current terminal? What if there are multiple terminals opened in the vs code? Will it return the current terminal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will return the default terminal details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please confirm that we require the default terminal instead of current terminal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per the existing behavior, even if we open multiple type of terminals in vscode, when we perform actions in liberty dashboard, commands will execute in the default terminal type. So we need to get default terminal details to decide the format of command.
TerminalBehavior.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Thanks.
src/util/commandUtils.ts
Outdated
* Return the maven commands based on the OS and Terminal for start, startinContainer, start.. | ||
*/ | ||
|
||
export async function getCommandForMaven(pomPath: string,command:string,customCommand?: string) : Promise<string> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly fix the indentations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the indentation.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Thanks.
Fixes #337
Fix for the issue - 'No such file or directory' raised for the start, start in container and start .. action of LTV dashboard for a project opened from the directory with space and project name with space.