ssh-wrapper 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/ssh-wrapper +7 -3
  2. metadata +3 -3
@@ -3,12 +3,16 @@
3
3
  # Set up command line
4
4
  command = ['ssh']
5
5
  # Do we want to skip SSH hostkey checking?
6
- command << "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" if ENV['SSH_SKIP_HOSTKEY_CHECK']
6
+ command << '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' if ENV['SSH_SKIP_HOSTKEY_CHECK']
7
7
  # Use a custom private key file?
8
- command << "-i #{ENV['SSH_IDENTITY_FILE']}" if ENV['SSH_IDENTITY_FILE']
8
+ command << "-i #{ENV['SSH_IDENTITY_FILE']}" if ENV['SSH_IDENTITY_FILE']
9
9
  # Use a custom port?
10
- command << "-p #{ENV['SSH_PORT']}" if ENV['SSH_PORT']
10
+ command << "-p #{ENV['SSH_PORT']}" if ENV['SSH_PORT']
11
11
  # Get the remaining options from the command line
12
12
  command += $*
13
+ # Quote each option
14
+ command = command.map{|p|'"'+p+'"'}
15
+
13
16
  # Execute the command
14
17
  exec command.join(' ')
18
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssh-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Charlie Smurthwaite