train
train copied to clipboard
Windows SSH connection results in error NoMethodError (undefined method `empty?' for nil:NilClass)
Version:
train 2.1.7
Environment:
Platform: Windows
Scenario:
While creating Windows SSH connection it results in giving undefined method empty? for nil class. Log trace provided in steps to reproduce
Steps to Reproduce:
train = Train.create('ssh', host: '34.67.198.170', port: 22, user: 'xxxxx', password: 'xxxxxx', pty: true)
conn = train.connection
Traceback (most recent call last):
16: from /home/msys/workspace/train/lib/train/transports/ssh.rb:238:in `create_new_connection'
15: from /home/msys/workspace/train/lib/train/transports/ssh.rb:238:in `new'
14: from /home/msys/workspace/train/lib/train/transports/ssh_connection.rb:53:in `initialize'
13: from /home/msys/workspace/train/lib/train/extras/command_wrapper.rb:165:in `load'
12: from /home/msys/workspace/train/lib/train/plugins/base_connection.rb:110:in `platform'
11: from /home/msys/workspace/train/lib/train/platforms/detect.rb:9:in `scan'
10: from /home/msys/workspace/train/lib/train/platforms/detect/scanner.rb:27:in `scan'
9: from /home/msys/workspace/train/lib/train/platforms/detect/scanner.rb:27:in `each'
8: from /home/msys/workspace/train/lib/train/platforms/detect/scanner.rb:33:in `block in scan'
7: from /home/msys/workspace/train/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
6: from /home/msys/workspace/train/lib/train/platforms/detect/scanner.rb:45:in `each'
5: from /home/msys/workspace/train/lib/train/platforms/detect/scanner.rb:46:in `block in scan_children'
4: from /home/msys/workspace/train/lib/train/platforms/detect/scanner.rb:46:in `instance_eval'
3: from /home/msys/workspace/train/lib/train/platforms/detect/specifications/os.rb:29:in `block in load'
2: from /home/msys/workspace/train/lib/train/platforms/detect/helpers/os_windows.rb:23:in `detect_windows'
1: from /home/msys/workspace/train/lib/train/platforms/detect/helpers/os_windows.rb:44:in `read_wmic'
NoMethodError (undefined method `empty?' for nil:NilClass)
Expected Result:
Actual Result:
[What actually happens after the reproduction steps?]
I think this is addressed but we need a verify