-
Notifications
You must be signed in to change notification settings - Fork 6k
feat: add test for EXTENSIONS_GALLERY #5432
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 2 commits
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 |
---|---|---|
|
@@ -6,9 +6,14 @@ import { promisify } from "util" | |
* | ||
* A helper function for integration tests to run code-server commands. | ||
*/ | ||
export async function runCodeServerCommand(argv: string[]): Promise<{ stdout: string; stderr: string }> { | ||
export async function runCodeServerCommand( | ||
argv: string[], | ||
env?: NodeJS.ProcessEnv, | ||
): Promise<{ stdout: string; stderr: string }> { | ||
const CODE_SERVER_COMMAND = process.env.CODE_SERVER_PATH || path.resolve("../../release-standalone/bin/code-server") | ||
const { stdout, stderr } = await promisify(exec)(`${CODE_SERVER_COMMAND} ${argv.join(" ")}`) | ||
const { stdout, stderr } = await promisify(exec)(`${CODE_SERVER_COMMAND} ${argv.join(" ")}`, { | ||
env: { ...process.env, ...env }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Woah I did not know Interestingly There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LOL JS is teaching us new things everyday 😂 |
||
}) | ||
|
||
return { stdout, stderr } | ||
} |
Check warning
Code scanning / CodeQL
Shell command built from environment values