Add stderr logging to E2E plugin creation step
Capture and print stdout and stderr when the plugin creation command fails, so that the actual error is visible in CI logs. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -383,12 +383,22 @@ async function createPlugin(options: {
|
||||
|
||||
try {
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
child.stdout?.on('data', (data: Buffer) => {
|
||||
stdout = stdout + data.toString('utf8');
|
||||
});
|
||||
child.stderr?.on('data', (data: Buffer) => {
|
||||
stderr = stderr + data.toString('utf8');
|
||||
});
|
||||
|
||||
print('Waiting for plugin create script to be done');
|
||||
await child.waitForExit();
|
||||
try {
|
||||
await child.waitForExit();
|
||||
} catch (error) {
|
||||
print(`stdout: ${stdout}`);
|
||||
print(`stderr: ${stderr}`);
|
||||
throw error;
|
||||
}
|
||||
|
||||
const pluginDir = resolvePath(
|
||||
appDir,
|
||||
|
||||
Reference in New Issue
Block a user