Skip to content

Commit b184b99

Browse files
committed
fix(commands): run cmd with start options to actually work
1 parent caf5b0d commit b184b99

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/commands/run.cr

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ module Geode::Commands
9797
private def run_script(script : String, dir : String) : Nil
9898
stdout << "» Running script: "
9999
stdout << '\n' if script.lines.size > 1
100-
stdout << script.colorize.light_gray << "\n\n"
100+
stdout << script.colorize.light_gray << '\n'
101101

102102
status : Process::Status
103103
taken : String
@@ -108,7 +108,7 @@ module Geode::Commands
108108
temp = File.tempfile("geode-tmp-run", ".cmd") do |file|
109109
file << script
110110
end
111-
status = Process.run(temp.path, chdir: dir, output: stdout, error: stderr)
111+
status = Process.run("cmd.exe", {"/Q", "/C", temp.path}, chdir: dir, output: stdout, error: stderr)
112112
taken = format_time(Time.monotonic - start)
113113
ensure
114114
temp.try &.delete
@@ -118,6 +118,7 @@ module Geode::Commands
118118
taken = format_time(Time.monotonic - start)
119119
{% end %}
120120

121+
puts
121122
if status.success?
122123
success "Completed in #{taken}"
123124
else

0 commit comments

Comments
 (0)