Skip to content

Commit 89276e1

Browse files
ffMathychrmarti
authored andcommitted
fix: don't group the actual running of the commands
1 parent 657cc0a commit 89276e1

File tree

1 file changed

+28
-33
lines changed

1 file changed

+28
-33
lines changed

github-action/src/main.ts

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -171,39 +171,34 @@ export async function runMain(): Promise<void> {
171171
return;
172172
}
173173

174-
const execResult = await core.group(
175-
'🚀 Run command in container',
176-
async () => {
177-
const args: DevContainerCliExecArgs = {
178-
workspaceFolder,
179-
configFile,
180-
command: ['bash', '-c', runCommand],
181-
env: inputEnvsWithDefaults,
182-
userDataFolder,
183-
};
184-
let execLogString = '';
185-
const execLog = (message: string): void => {
186-
core.info(message);
187-
if (!message.includes('@devcontainers/cli')) {
188-
execLogString += message;
189-
}
190-
};
191-
const exitCode = await devcontainer.exec(args, execLog);
192-
if (exitCode !== 0) {
193-
const errorMessage = `Dev container exec failed: (exit code: ${exitCode})`;
194-
core.error(errorMessage);
195-
core.setFailed(errorMessage);
196-
}
197-
core.setOutput('runCmdOutput', execLogString);
198-
if (Buffer.byteLength(execLogString, 'utf-8') > 1000000) {
199-
execLogString = truncate(execLogString, 999966);
200-
execLogString += 'TRUNCATED TO 1 MB MAX OUTPUT SIZE';
201-
}
202-
core.setOutput('runCmdOutput', execLogString);
203-
return exitCode;
204-
},
205-
);
206-
if (execResult !== 0) {
174+
175+
const args: DevContainerCliExecArgs = {
176+
workspaceFolder,
177+
configFile,
178+
command: ['bash', '-c', runCommand],
179+
env: inputEnvsWithDefaults,
180+
userDataFolder,
181+
};
182+
let execLogString = '';
183+
const execLog = (message: string): void => {
184+
core.info(message);
185+
if (!message.includes('@devcontainers/cli')) {
186+
execLogString += message;
187+
}
188+
};
189+
const exitCode = await devcontainer.exec(args, execLog);
190+
if (exitCode !== 0) {
191+
const errorMessage = `Dev container exec failed: (exit code: ${exitCode})`;
192+
core.error(errorMessage);
193+
core.setFailed(errorMessage);
194+
}
195+
core.setOutput('runCmdOutput', execLogString);
196+
if (Buffer.byteLength(execLogString, 'utf-8') > 1000000) {
197+
execLogString = truncate(execLogString, 999966);
198+
execLogString += 'TRUNCATED TO 1 MB MAX OUTPUT SIZE';
199+
}
200+
core.setOutput('runCmdOutput', execLogString);
201+
if (exitCode !== 0) {
207202
return;
208203
}
209204
} else {

0 commit comments

Comments
 (0)