Class: Builtins::Exec
Instance Attribute Summary
Attributes inherited from Builtin
#args, #config
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Builtin
class_for, #initialize
Constructor Details
This class inherits a constructor from Builtin
Class Method Details
.description ⇒ Object
11
12
13
|
# File 'lib/builtins/exec.rb', line 11
def description
"executes the given command in the `ops` environment, i.e. with environment variables set"
end
|
Instance Method Details
#run ⇒ Object
16
17
18
19
20
21
22
23
24
|
# File 'lib/builtins/exec.rb', line 16
def run
Secrets.load if Options.get("exec.load_secrets")
if args.any?
Kernel.exec(args.join(" "))
else
Output.error("Usage: ops exec '<command>'")
end
end
|