Class: Ddenv::Goals::ShadowenvTrusted
Instance Method Summary
collapse
Methods inherited from Ddenv::Goal
#==, #eql?, #hash, #initialize, #post_goals, #pre_goals, #props, #with_pre_and_post_goals
Constructor Details
This class inherits a constructor from Ddenv::Goal
Instance Method Details
#achieve ⇒ Object
21
22
23
24
25
|
# File 'lib/ddenv/goals/shadowenv_trusted.rb', line 21
def achieve
cmd = TTY::Command.new(printer: :null)
cmd.run("shadowenv", "trust")
end
|
#achieved? ⇒ Boolean
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/ddenv/goals/shadowenv_trusted.rb', line 10
def achieved?
cmd = TTY::Command.new(printer: :null)
begin
cmd.run("shadowenv", "exec", "--", "ls")
rescue StandardError
return false
end
true
end
|
#message ⇒ Object
6
7
8
|
# File 'lib/ddenv/goals/shadowenv_trusted.rb', line 6
def message
"Trusting .shadowenv.d"
end
|