tpkg 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/bin/tpkg +9 -3
  3. data/lib/tpkg.rb +1 -1
  4. metadata +2 -2
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ spec = Gem::Specification.new do |s|
5
5
  s.add_dependency('facter')
6
6
  s.add_dependency('net-ssh')
7
7
  s.add_dependency('ddao-kwalify')
8
- s.version = '2.1.0'
8
+ s.version = '2.1.1'
9
9
  s.authors = ['Darren Dao', 'Jason Heiss']
10
10
  s.email = 'tpkg-users@lists.sourceforge.net'
11
11
  s.homepage = 'http://tpkg.sourceforge.net'
data/bin/tpkg CHANGED
@@ -382,10 +382,16 @@ if @deploy
382
382
  @deploy_options["max-worker"] = @worker_count
383
383
  @deploy_options["abort-on-fail"] = false
384
384
 
385
- # check to see if ssh-key is accessible
386
- if @deploy_options["use-ssh-key"]
385
+ # Check to see if ssh-key is accessible
386
+ # Net::SSH doesn't warn the user about problems with the key file
387
+ # (i.e. if it doesn't exist or isn't readable), resulting in the user
388
+ # just getting a generic "Bad username/password combination" error
389
+ # message because authentication fails. As such we do some of our own
390
+ # checking and warning here so that the user gets a more specific
391
+ # error message.
392
+ if @deploy_options["use-ssh-key"] && @deploy_options["ssh-key"]
387
393
  ssh_key = @deploy_options["ssh-key"]
388
- if !File.readable?(ssh_key) && Process.euid == 0
394
+ if !File.readable?(ssh_key) && (Process.euid == 0 || !@sudo)
389
395
  raise "Unable to read ssh key from #{ssh_key}"
390
396
  elsif !File.readable?(ssh_key)
391
397
  warn "Warning: Unable to read ssh key from #{ssh_key}. Attempting to rerun tpkg with sudo."
@@ -56,7 +56,7 @@ require 'kwalify' # for validating yaml
56
56
 
57
57
  class Tpkg
58
58
 
59
- VERSION = '2.1.0'
59
+ VERSION = '2.1.1'
60
60
 
61
61
  GENERIC_ERR = 1
62
62
  POSTINSTALL_ERR = 2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tpkg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Dao
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-12-17 00:00:00 -08:00
13
+ date: 2011-01-03 00:00:00 -08:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency