Skip to content

Commit e5ba32a

Browse files
authored
Merge pull request #61 from OpenVoxProject/keep_default
Default --keepwork to on-failure
2 parents a8b30ad + b5fb321 commit e5ba32a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/vanagon/cli/build.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Build < Vanagon::CLI
2020
-s, --skipcheck Skip the "check" stage when building components
2121
-w, --workdir DIRECTORY Working directory on the local host,
2222
managed automatically based on `keepwork` option
23-
-k, --keepwork RULE Rule for preserving local `workdir`: [Default: never]
23+
-k, --keepwork RULE Rule for preserving local `workdir`: [Default: on-failure]
2424
always, on-success, on-failure, never
2525
-v, --verbose Only here for backwards compatibility. Does nothing.
2626

lib/vanagon/driver.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def initialize(platform, project, options = {}) # rubocop:disable Metrics/AbcSiz
2727
@verbose = options[:verbose] || false
2828
@preserve = options[:preserve] || :'on-failure'
2929
@workdir = options[:workdir] || Dir.mktmpdir
30-
@keepwork = options[:keepwork] || :never
30+
@keepwork = options[:keepwork] || :'on-failure'
3131

3232
@@configdir = options[:configdir] || File.join(Dir.pwd, "configs")
3333
components = options[:components] || []

spec/lib/vanagon/cli_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
subject = described_class.new
4444
expect(subject.parse(%W[build hello project platform])).to include(:preserve => :'on-failure')
4545
end
46-
it "keepwork defaults to :never" do
46+
it "keepwork defaults to :on-failure" do
4747
subject = described_class.new
48-
expect(subject.parse(%W[build hello project platform])).to include(:keepwork => :never)
48+
expect(subject.parse(%W[build hello project platform])).to include(:keepwork => :'on-failure')
4949
end
5050
end
5151

0 commit comments

Comments
 (0)