From 9d36c1d8cb5a0eb88d35c15060355c27674a08e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Fri, 2 Aug 2024 10:38:12 +0300 Subject: [PATCH 1/2] Fix the argument passing --- action.yml | 6 ++---- entrypoint.sh | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 18773d3..8943ad3 100644 --- a/action.yml +++ b/action.yml @@ -17,8 +17,6 @@ runs: using: 'docker' image: 'Dockerfile' args: - - --path - - ${{ inputs.template }} + - --path=${{ inputs.template }} + - --name=${{ inputs.name }} - ${{ inputs.arguments }} - - --name - - ${{ inputs.name }} diff --git a/entrypoint.sh b/entrypoint.sh index 86c8fd7..fd025ad 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,4 +7,7 @@ if [ -z "$USER" ]; then export USER="runner" fi -/usr/bin/cargo-generate generate --silent $* +# Separate arguments before passing them +args=$(echo "$@" | xargs) + +/usr/bin/cargo-generate generate --silent $args From a465b5a8a2a858653627b11130b824af6600b4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sun, 4 Aug 2024 11:51:28 +0300 Subject: [PATCH 2/2] Update arguments example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dab72c8..a4bc707 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ All other arguments that cargo-generate accepts Example: ```yml -arguments: "--branch x --define foo=\"value\" --define bar=42" +arguments: "--branch x --define=foo=\"value\" --define=bar=42" ``` ## Example