From 55df939d308d4c38fc4b2e0ad90b2c0e2f523a0a Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Wed, 23 Dec 2020 18:58:29 +0000 Subject: Make CYGWIN environment variable configurable Some users might want different behaviour from the CYGWIN environment variable, and in particular it seems reasonable to assume they don't want non-default behaviour unless they explicitly ask for it. As such, make the environment variable configurable, and default to empty. This change is not backwards compatible: prior to this change a Cygwin install will have CYGWIN=winsymlinks:nativestrict, whereas afterwards the variable will default to blank. To obtain the previous behaviour, a user would need to add `env: 'winsymlinks:nativestrict'` to the set of inputs. Fixes #1. --- action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 797516b..02f19a9 100644 --- a/action.yml +++ b/action.yml @@ -13,6 +13,9 @@ inputs: packages: description: Packages to install, separated by a space required: false + env: + description: Value to set as the CYGWIN environment variable + required: false runs: using: composite @@ -27,7 +30,7 @@ runs: New-Variable packages -Value '${{ inputs.packages}}' -Option Constant if ($windows_host) { - echo 'CYGWIN=winsymlinks:nativestrict' >> $env:GITHUB_ENV + echo 'CYGWIN=${{ inputs.env }}' >> $env:GITHUB_ENV $choco_params = @( 'install', -- cgit v1.2.3