@absolutejs/absolute 0.13.2 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +11 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -17,12 +17,12 @@ var readDbScripts = async () => {
|
|
|
17
17
|
return null;
|
|
18
18
|
return { upCommand, downCommand };
|
|
19
19
|
};
|
|
20
|
-
var execCommand = async (command) => {
|
|
20
|
+
var execCommand = async (command, options) => {
|
|
21
21
|
const args = command.split(" ");
|
|
22
22
|
const proc = Bun.spawn(args, {
|
|
23
23
|
stdin: "inherit",
|
|
24
|
-
stdout: "inherit",
|
|
25
|
-
stderr: "inherit"
|
|
24
|
+
stdout: options?.silent ? "pipe" : "inherit",
|
|
25
|
+
stderr: options?.silent ? "pipe" : "inherit"
|
|
26
26
|
});
|
|
27
27
|
return proc.exited;
|
|
28
28
|
};
|
|
@@ -36,7 +36,14 @@ var stopDatabase = async (scripts) => {
|
|
|
36
36
|
console.log(`
|
|
37
37
|
Stopping database container...`);
|
|
38
38
|
try {
|
|
39
|
-
await execCommand(scripts.downCommand
|
|
39
|
+
const exitCode = await execCommand(scripts.downCommand, {
|
|
40
|
+
silent: true
|
|
41
|
+
});
|
|
42
|
+
if (exitCode === 0) {
|
|
43
|
+
console.log("Database container stopped.");
|
|
44
|
+
} else {
|
|
45
|
+
console.error("Failed to stop database container");
|
|
46
|
+
}
|
|
40
47
|
} catch {
|
|
41
48
|
console.error("Failed to stop database container");
|
|
42
49
|
}
|
package/package.json
CHANGED