Class: Fastlane::Helper::BitwardenHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/bitwarden/helper/bitwarden_helper.rb

Instance Method Summary collapse

Constructor Details

#initialize(cli_path) ⇒ BitwardenHelper



8
9
10
# File 'lib/fastlane/plugin/bitwarden/helper/bitwarden_helper.rb', line 8

def initialize(cli_path)
  @cli_path = cli_path || "bw"
end

Instance Method Details

#exec(*command, log: false, error_callback: nil) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/fastlane/plugin/bitwarden/helper/bitwarden_helper.rb', line 12

def exec(*command, log: false, error_callback: nil)
  ENV['BW_SESSION'] = Actions.lane_context[Actions::SharedValues::BW_SESSION]
  command.insert(0, @cli_path)
  res = Fastlane::Actions::sh(*command, log: log, error_callback: error_callback)
  ENV.delete('BW_SESSION')
  res
end