Module: Avm::Patches::EacLauncherGitBase

Defined in:
lib/avm/patches/eac_launcher_git_base.rb

Instance Method Summary collapse

Instance Method Details

#command(*args) ⇒ Object



17
18
19
20
# File 'lib/avm/patches/eac_launcher_git_base.rb', line 17

def command(*args)
  args, _options = build_args(args)
  ::EacRubyUtils::Envs.local.command(*args)
end

#dirty?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/avm/patches/eac_launcher_git_base.rb', line 22

def dirty?
  dirty_files.any?
end

#dirty_filesObject



26
27
28
29
30
# File 'lib/avm/patches/eac_launcher_git_base.rb', line 26

def dirty_files
  execute!('status', '--porcelain', '--untracked-files').each_line.map do |line|
    parse_status_line(line.gsub(/\n\z/, ''))
  end
end

#execute(*args) ⇒ Object



12
13
14
15
# File 'lib/avm/patches/eac_launcher_git_base.rb', line 12

def execute(*args)
  args, options = build_args(args)
  ::EacRubyUtils::Envs.local.command(*args).execute(options)
end