@@ -51,14 +51,27 @@ export async function run(): Promise<void> {
5151
5252 try {
5353 const skipInstall = parseBoolean ( core . getInput ( 'skip_install' ) ) ;
54+ let version = presence ( core . getInput ( 'version' ) ) ;
55+ const components = core . getInput ( 'install_components' ) ;
56+ const projectId = core . getInput ( 'project_id' ) ;
57+
5458 if ( skipInstall ) {
5559 core . info ( `Skipping installation ("skip_install" was true)` ) ;
60+ if ( version ) {
61+ core . warning ( `Ignoring "version" because "skip_install" was true!` ) ;
62+ }
63+
64+ if ( components ) {
65+ core . warning (
66+ `Installing custom components with the system-provided gcloud may fail. ` +
67+ `Set "skip_install" to false to install a managed version.` ,
68+ ) ;
69+ }
5670 } else {
5771 // Compute the version information. If the version was not specified,
5872 // accept any installed version. If the version was specified as "latest",
5973 // compute the latest version. Otherwise, accept the version/version
6074 // constraint as-is.
61- let version = presence ( core . getInput ( 'version' ) ) ;
6275 if ( ! version ) {
6376 core . debug ( `version was unset, defaulting to any version` ) ;
6477 version = '> 0.0.0' ;
@@ -80,7 +93,6 @@ export async function run(): Promise<void> {
8093 }
8194
8295 // Install additional components
83- const components = core . getInput ( 'install_components' ) ;
8496 if ( components ) {
8597 await installComponent ( components . split ( ',' ) . map ( ( comp ) => comp . trim ( ) ) ) ;
8698 }
@@ -97,7 +109,6 @@ export async function run(): Promise<void> {
97109 }
98110
99111 // Set the project ID, if given.
100- const projectId = core . getInput ( 'project_id' ) ;
101112 if ( projectId ) {
102113 await setProject ( projectId ) ;
103114 core . info ( 'Successfully set default project' ) ;
0 commit comments