-
Notifications
You must be signed in to change notification settings - Fork 80
Fix Windows Development Build Issues #1657
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -132,15 +132,15 @@ function getComposerURI(webView: Webview): string { | |
| function getComposerCSSFiles(disableComDebug: boolean, devHost: string, webView: Webview): string[] { | ||
| const filePath = join((extension.ballerinaExtInstance.context as ExtensionContext).extensionPath, 'resources', 'jslibs', 'themes', 'ballerina-default.min.css'); | ||
| return [ | ||
| (isDevMode && !disableComDebug) ? join(devHost, 'themes', 'ballerina-default.min.css') | ||
| (isDevMode && !disableComDebug) ? `${devHost}/themes/ballerina-default.min.css` | ||
| : webView.asWebviewUri(Uri.file(filePath)).toString() | ||
| ]; | ||
| } | ||
|
|
||
| function getComposerJSFiles(componentName: string, disableComDebug: boolean, devHost: string, webView: Webview): string[] { | ||
| const filePath = join((extension.ballerinaExtInstance.context as ExtensionContext).extensionPath, 'resources', 'jslibs') + sep + componentName + '.js'; | ||
| return [ | ||
| (isDevMode && !disableComDebug) ? join(devHost, componentName + '.js') | ||
| (isDevMode && !disableComDebug) ? `${devHost}/${componentName}.js` | ||
|
||
| : webView.asWebviewUri(Uri.file(filePath)).toString(), | ||
| isDevMode ? 'http://localhost:8097' : '' // For React Dev Tools | ||
| ]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -337,7 +337,7 @@ function extractBinary(archivePath, platform, destDir) { | |
|
|
||
| try { | ||
| if (platform.ext === '.tar.gz') { | ||
| execSync(`tar -xzf '${archivePath}' -C '${tmpExtractDir}'`, { stdio: 'inherit' }); | ||
| execSync(`tar -xzf "${archivePath}" -C "${tmpExtractDir}"`, { stdio: 'inherit' }); | ||
|
||
| } else if (platform.ext === '.zip') { | ||
| if (os.platform() === 'win32') { | ||
| execSync(`powershell.exe -Command "Expand-Archive -Path '${archivePath}' -DestinationPath '${tmpExtractDir}' -Force"`, { stdio: 'inherit' }); | ||
|
|
||
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.
If
devHostis configured with a trailing slash (e.g.,http://localhost:port/), this will produce a double-slash URL (...//themes/...). Consider normalizingdevHost(trim trailing/) once, or usenew URL('/themes/ballerina-default.min.css', devHost).toString()to build a correct URL robustly.