From ac4e85883599916740167aed2c652390762f2cb9 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Fri, 29 Apr 2022 09:14:59 +0500 Subject: [PATCH 1/5] Add warning if python version set to empty value --- src/setup-python.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/setup-python.ts b/src/setup-python.ts index 62c76dba..6136237d 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -53,6 +53,10 @@ async function run() { if (cache && isCacheFeatureAvailable()) { await cacheDependencies(cache, pythonVersion); } + } else { + core.warning( + 'python-version is empty, the OS native python will be used' + ); } const matchersPath = path.join(__dirname, '../..', '.github'); core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`); From 22daa094b838330a3ab8897dbf26828efd05d952 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Fri, 29 Apr 2022 09:29:36 +0500 Subject: [PATCH 2/5] Add generated files --- dist/setup/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dist/setup/index.js b/dist/setup/index.js index c51a5f77..f5c9fb92 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -6112,6 +6112,9 @@ function run() { yield cacheDependencies(cache, pythonVersion); } } + else { + core.warning('python-version is empty, the OS native python will be used'); + } const matchersPath = path.join(__dirname, '../..', '.github'); core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`); } From 0b56b76337193b501b7096345a23f23b2590298b Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Fri, 29 Apr 2022 12:49:49 +0500 Subject: [PATCH 3/5] Improve wording --- dist/setup/index.js | 2 +- src/setup-python.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index f5c9fb92..367e9ed9 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -6113,7 +6113,7 @@ function run() { } } else { - core.warning('python-version is empty, the OS native python will be used'); + core.warning("Step input 'python-version' is not set, the OS native python version will be used"); } const matchersPath = path.join(__dirname, '../..', '.github'); core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`); diff --git a/src/setup-python.ts b/src/setup-python.ts index 6136237d..25f18b60 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -55,7 +55,7 @@ async function run() { } } else { core.warning( - 'python-version is empty, the OS native python will be used' + "Step input 'python-version' is not set, the OS native python version will be used" ); } const matchersPath = path.join(__dirname, '../..', '.github'); From e31727ce0a67347596370ec677fbc441cfa3ca90 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Wed, 4 May 2022 12:43:58 +0500 Subject: [PATCH 4/5] Improve warning message Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com> --- src/setup-python.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setup-python.ts b/src/setup-python.ts index 25f18b60..3584b59a 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -55,7 +55,7 @@ async function run() { } } else { core.warning( - "Step input 'python-version' is not set, the OS native python version will be used" + "The `python-version` input is not set. The version of Python currently in `PATH` will be used." ); } const matchersPath = path.join(__dirname, '../..', '.github'); From 8f73c1495f8947f3553ede54257c5ff89825432b Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Wed, 4 May 2022 12:55:36 +0500 Subject: [PATCH 5/5] Formatting --- dist/setup/index.js | 2 +- src/setup-python.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 367e9ed9..86edc53c 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -6113,7 +6113,7 @@ function run() { } } else { - core.warning("Step input 'python-version' is not set, the OS native python version will be used"); + core.warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.'); } const matchersPath = path.join(__dirname, '../..', '.github'); core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`); diff --git a/src/setup-python.ts b/src/setup-python.ts index 3584b59a..14700b7b 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -55,7 +55,7 @@ async function run() { } } else { core.warning( - "The `python-version` input is not set. The version of Python currently in `PATH` will be used." + 'The `python-version` input is not set. The version of Python currently in `PATH` will be used.' ); } const matchersPath = path.join(__dirname, '../..', '.github');