Skip to content
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

Fix alpine support #5322

Merged
merged 2 commits into from
Jul 29, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/common.ts
Original file line number Diff line number Diff line change
@@ -23,10 +23,9 @@ export function getExtensionPath() {
return extensionPath;
}

export function getUnixTempDirectory(){
export function getUnixTempDirectory() {
let envTmp = process.env.TMPDIR;
if(!envTmp)
{
if (!envTmp) {
return "/tmp/";
}

@@ -61,9 +60,9 @@ export async function execChildProcess(command: string, workingDirectory: string
return new Promise<string>((resolve, reject) => {
cp.exec(command, { cwd: workingDirectory, maxBuffer: 500 * 1024 }, (error, stdout, stderr) => {
if (error) {
reject(`${error}
reject(new Error(`${error}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling code expected that an Error would be rejected.

${stdout}
${stderr}`);
${stderr}`));
}
else if (stderr && !stderr.includes("screen size is bogus")) {
reject(new Error(stderr));
@@ -203,7 +202,7 @@ export function isSubfolderOf(subfolder: string, folder: string): boolean {
/**
* Find PowerShell executable from PATH (for Windows only).
*/
export function findPowerShell(): string | undefined {
export function findPowerShell(): string | undefined {
const dirs: string[] = (process.env.PATH || '').replace(/"+/g, '').split(';').filter(x => x);
const names: string[] = ['pwsh.exe', 'powershell.exe'];
for (const name of names) {