Skip to content

Commit dd9f666

Browse files
committed
cli/bugs fixes in multiple commands (db dump, env switch)
- wheels env switch removed output bug, invalid call to detailOutput.create() fixed. - wheels db dump quotes parsing issue for MacOs resolved
1 parent 008d9d9 commit dd9f666

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

cli/src/commands/wheels/db/dump.cfc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ component extends="../base" {
689689
local.outputDir = GetDirectoryFromPath(local.outputFile);
690690
if (Len(local.outputDir) && !DirectoryExists(local.outputDir)) {
691691
DirectoryCreate(local.outputDir, true);
692+
detailOutput.statusInfo("Created output directory: #local.outputDir#");
692693
}
693694

694695
// Check if a folder with the .sql name exists and remove it
@@ -735,12 +736,19 @@ component extends="../base" {
735736
// Handle compression
736737
if (arguments.options.compress) {
737738
local.cmd &= " -Z 9"; // Maximum compression
739+
// Add .gz extension if not already present
740+
if (ListLast(local.outputFile, ".") != "gz") {
741+
local.outputFile &= ".gz";
742+
}
738743
}
739744

740745
// For Windows: Use shell redirection instead of -f option
741746
if (isWindows()) {
742747
// Use stdout redirection instead of -f parameter
743748
local.cmd &= " > " & Chr(34) & local.outputFile & Chr(34);
749+
} else if(isMac()) {
750+
// Mac OS: Use -f parameter without quotes
751+
local.cmd &= " -f " & local.outputFile;
744752
} else {
745753
// Unix/Linux: Use -f parameter
746754
local.cmd &= " -f " & Chr(34) & local.outputFile & Chr(34);

cli/src/commands/wheels/env/switch.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ component extends="../base" {
141141
if (structKeyExists(result, "oldEnvironment") && len(result.oldEnvironment)) {
142142
detailOutput.update(".env file: Updated from #result.oldEnvironment# to #arguments.environment#", true);
143143
} else {
144-
detailOutput.create(".env file", "Set to #arguments.environment# environment");
144+
detailOutput.create(".env file Set to #arguments.environment# environment", true);
145145
}
146146
}
147147

cli/src/commands/wheels/set.cfc

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)