Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8955fda

Browse files
committedOct 24, 2024·
2.x: Fixed the way to check if current container is based on ce-dev
1 parent efd0945 commit 8955fda

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎src/abstracts/base-cmd-abstract.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,18 +266,24 @@ export default abstract class BaseCmd extends Command {
266266
protected getProjectRunningContainersCeDev(): Array<string> {
267267
const running = this.getProjectRunningContainers();
268268
const ceDev = [];
269-
const regex = /^codeenigma\/.*/gm;
269+
const regex = /ce-dev:.*/gm;
270270
for (const containerName of running) {
271271
const image = execSync(this.dockerBin +
272272
' inspect ' +
273273
containerName +
274274
' --format={{.Config.Image}}')
275275
.toString()
276276
.trim();
277-
if (regex.test(image)) {
277+
const labels = execSync(
278+
this.dockerBin + ' inspect ' + image + ' --format={{.Config.Labels}}')
279+
.toString()
280+
.trim()
281+
282+
if (regex.test(labels)) {
278283
ceDev.push(containerName);
279284
}
280285
}
286+
281287
return ceDev;
282288
}
283289

0 commit comments

Comments
 (0)
Please sign in to comment.