Merge pull request #3 from piersb/allow-files-with-spaces

Allow files with spaces
This commit is contained in:
Piers Beckley 2022-08-24 15:41:35 +01:00 committed by GitHub
commit 10de52184d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 29 deletions

View File

@ -7,18 +7,18 @@ jobs:
steps:
- uses: actions/checkout@master
- name: copy file
uses: piersb/copy-file-action@main
uses: canastro/copy-file-action@master
with:
source: "tests/a.txt"
target: "test-a.txt"
- name: copy file with args
uses: piersb/copy-file-action@main
uses: canastro/copy-file-action@master
with:
source: "tests/a.txt"
target: "test-a.txt"
flags: "-f"
- name: copy file with args
uses: piersb/copy-file-action@main
- name: copy file with spaces
uses: canastro/copy-file-action@master
with:
source: "tests/path with spaces.txt"
target: "path-without-spaces.txt"

View File

@ -1,4 +1,4 @@
name: 'Copy file (with spaces)'
name: 'Copy file'
description: 'Copy local files'
author: 'Ricardo Canastro'
inputs:

View File

@ -1,25 +1,3 @@
#!/bin/bash -l
#!/bin/sh -l
#bash -c "$(cp ' %q' "$@")"
echo "hello"
>&2 echo "test debug message"
time=$(date)
echo "::set-output name=time::$time"
ENV ARG_1=$1
ENV ARG_2=$2
ENV ARG_3=$3
echo $1 >> /tmp/logs.txt
echo $2 >> /tmp/logs.txt
echo $3 >> /tmp/logs.txt
echo >> /tmp/logs.txt "Receiving " $# " arguments"
echo "trying to run cp " "$2 " "$3"
#cp "$2" "$3"
cp $1 "$2" "$3"

0
test
View File