train-pwsh 0.1.2 → 0.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89e3a18c81cf9e11a8c44fab1922b73b7b131d79bc06e880f2465b0fa1855f86
4
- data.tar.gz: 0eed86dd58bfeaa57ae2d838f24f8c1b29f518f012c55638f393e5b58fc0b3dd
3
+ metadata.gz: 39702d4eac70b2194a4c37b925bd3029169c874b0d649360c1b64509fa81c86e
4
+ data.tar.gz: 58248aeb93158177f68664d638660128fafd13f75d43d5439a5add22d4c3da5b
5
5
  SHA512:
6
- metadata.gz: c03186763343739f788179381799a58b817012ae2d364de5c8a72f6d356950c25a8953449ef17343486c63cace359efba0548f5394d78c2e8f047154defb5edf
7
- data.tar.gz: 9ac43a9c24bdf4d9612f323507ec58ff8579ec7c7b34a533ee04c3c9f6784f0f4d174ca5a58785cc584b578f94fcdfb4ca3c97bceee4941e3c5db0a1ed98338f
6
+ metadata.gz: '0484eace9bfecbb42c78967bdd0aca9c3c75f32202fca17ac55342202652ee5fed32e45d6f2df19eb15360e978648acaa491c85574dedd9411bf576a6f7d4855'
7
+ data.tar.gz: bfcae4cdf0664ab10d3dbe819d4de61c9b067c25a7ff583afaa6184b313865f01492b6d272b791439adffb43e3ac18bcdfb869bbdaccd6dc40ebe61176bd97f5
data/README.md CHANGED
@@ -25,7 +25,7 @@ If train is being invoked using code, this is how it can be used:
25
25
  ```ruby
26
26
  require 'train'
27
27
  train = Train.create('pwsh',
28
- client_id: '1', tenant_id: '2', client_secret: '3', certificate_path: '4', certificate_password: '5', organization: '6', sharepoint_admin_url: '7')
28
+ client_id: '1', tenant_id: '2', client_secret: '3', certificate_path: '4', certificate_password: '5', organization: '6', sharepoint_admin_url: '7', pwsh_path: '8')
29
29
  ```
30
30
 
31
31
  ## Installation
@@ -151,6 +151,11 @@ module TrainPlugins
151
151
  if result[:stdout].nil?
152
152
  result[:stdout] = ""
153
153
  end
154
+ if !result[:stdout].empty? && result[:stdout].match?(/is not recognized|session is not established/i)
155
+ result[:stderr] = result[:stdout]
156
+ result[:stdout] = ""
157
+ result[:exitcode] = -1
158
+ end
154
159
  return CommandResult.new(result[:stdout],result[:stderr],result[:exitcode])
155
160
  end
156
161
 
@@ -159,6 +164,11 @@ module TrainPlugins
159
164
  if result[:stdout].nil?
160
165
  result[:stdout] = ""
161
166
  end
167
+ if !result[:stdout].empty? && result[:stdout].match?(/is not recognized|session is not established/i)
168
+ result[:stderr] = result[:stdout]
169
+ result[:stdout] = ""
170
+ result[:exitcode] = -1
171
+ end
162
172
  return CommandResult.new(result[:stdout],result[:stderr],result[:exitcode])
163
173
  end
164
174
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Train
4
4
  module Pwsh
5
- VERSION = "0.1.2"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: train-pwsh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sujay Kandwal
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-24 00:00:00.000000000 Z
11
+ date: 2024-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: train