Skip to content

Commit 3c88c64

Browse files
authored
Enable pretty runner on Windows (mina-deploy#705)
1 parent 94fd210 commit 3c88c64

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

lib/mina/runner.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class Runner
88

99
def initialize(commands, backend)
1010
fail 'You must specify execution mode' if execution_mode.nil?
11-
fail 'Unsuported execution mode (pretty on windows)' if unsuported_execution_mode?
1211

1312
@backend = backend
1413
@commands = commands
@@ -33,10 +32,6 @@ def script
3332
Mina::Backend.const_get(class_name_for(backend)).new(commands).prepare
3433
end
3534

36-
def unsuported_execution_mode?
37-
execution_mode == :pretty && Gem::Platform.local.os == :windows
38-
end
39-
4035
def class_name_for(symbol)
4136
symbol.to_s.split('_').map(&:capitalize).join
4237
end

spec/lib/mina/runner_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
expect { described_class.new(nil, nil) }.to raise_error('You must specify execution mode')
1212
end
1313

14-
it 'raises an error when run on windows and pretty print' do
15-
instance.set(:execution_mode, :pretty)
16-
allow(Gem::Platform.local).to receive(:os).and_return(:windows)
17-
expect { described_class.new(nil, nil) }.to raise_error('Unsuported execution mode (pretty on windows)')
18-
end
19-
2014
it 'sets execution mode to printer if simulate is true' do
2115
instance.set(:execution_mode, :pretty)
2216
instance.set(:simulate, true)

0 commit comments

Comments
 (0)