File tree Expand file tree Collapse file tree 6 files changed +28
-12
lines changed Expand file tree Collapse file tree 6 files changed +28
-12
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,18 @@ async function configureHelm() {
3232
3333async function verifyHelm ( ) {
3434 console . log ( tl . loc ( "VerifyHelmInstallation" ) ) ;
35+ var helmVersion = await helminstaller . getHelmVersion ( ) ;
3536 var helmToolPath = tl . which ( "helm" , true ) ;
3637 var helmTool = tl . tool ( helmToolPath ) ;
37- helmTool . arg ( "init" ) ;
38- helmTool . arg ( "--client-only" ) ;
38+
39+ // Check if using Helm 2 or Helm 3
40+ if ( helmVersion . startsWith ( "v2" ) ) {
41+ helmTool . arg ( "init" ) ;
42+ helmTool . arg ( "--client-only" ) ;
43+ } else {
44+ helmTool . arg ( "version" ) ;
45+ }
46+
3947 return helmTool . exec ( )
4048}
4149
Original file line number Diff line number Diff line change 1313 "author" : " Microsoft Corporation" ,
1414 "version" : {
1515 "Major" : 0 ,
16- "Minor" : 155 ,
17- "Patch" : 1
16+ "Minor" : 159 ,
17+ "Patch" : 0
1818 },
1919 "demands" : [],
2020 "satisfies" : [
Original file line number Diff line number Diff line change 1313 "author" : " Microsoft Corporation" ,
1414 "version" : {
1515 "Major" : 0 ,
16- "Minor" : 155 ,
17- "Patch" : 1
16+ "Minor" : 159 ,
17+ "Patch" : 0
1818 },
1919 "demands" : [],
2020 "satisfies" : [
9393 "HelmLatestNotKnown" : " ms-resource:loc.messages.HelmLatestNotKnown" ,
9494 "VerifyHelmInstallation" : " ms-resource:loc.messages.VerifyHelmInstallation"
9595 }
96- }
96+ }
Original file line number Diff line number Diff line change @@ -20,10 +20,18 @@ async function configureHelm() {
2020
2121async function verifyHelm ( ) {
2222 console . log ( tl . loc ( "VerifyHelmInstallation" ) ) ;
23+ var helmVersion = await utils . getHelmVersion ( ) ;
2324 var helmToolPath = tl . which ( "helm" , true ) ;
2425 var helmTool = tl . tool ( helmToolPath ) ;
25- helmTool . arg ( "init" ) ;
26- helmTool . arg ( "--client-only" ) ;
26+
27+ // Check if using Helm 2 or Helm 3
28+ if ( helmVersion . startsWith ( "v2" ) ) {
29+ helmTool . arg ( "init" ) ;
30+ helmTool . arg ( "--client-only" ) ;
31+ } else {
32+ helmTool . arg ( "version" ) ;
33+ }
34+
2735 return helmTool . exec ( )
2836}
2937
Original file line number Diff line number Diff line change 1414 "version" : {
1515 "Major" : 1 ,
1616 "Minor" : 159 ,
17- "Patch" : 2
17+ "Patch" : 3
1818 },
1919 "preview" : true ,
2020 "demands" : [],
Original file line number Diff line number Diff line change 1414 "version" : {
1515 "Major" : 1 ,
1616 "Minor" : 159 ,
17- "Patch" : 2
17+ "Patch" : 3
1818 },
1919 "preview" : true ,
2020 "demands" : [],
4141 "NotAValidSemverVersion" : " ms-resource:loc.messages.NotAValidSemverVersion" ,
4242 "VerifyHelmInstallation" : " ms-resource:loc.messages.VerifyHelmInstallation"
4343 }
44- }
44+ }
You can’t perform that action at this time.
0 commit comments