mirror of
https://github.com/canastro/copy-action.git
synced 2024-12-27 19:45:02 +08:00
Merge pull request #1 from piersb/allow-files-with-spaces
Allow files with spaces
This commit is contained in:
commit
2c7db2f8dc
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@ -7,13 +7,19 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: copy file
|
||||
uses: canastro/copy-file-action@master
|
||||
uses: piersb/copy-file-action@allow-files-with-spaces
|
||||
with:
|
||||
source: "tests/a.txt"
|
||||
target: "test-a.txt"
|
||||
- name: copy file with args
|
||||
uses: canastro/copy-file-action@master
|
||||
uses: piersb/copy-file-action@allow-files-with-spaces
|
||||
with:
|
||||
source: "tests/a.txt"
|
||||
target: "test-a.txt"
|
||||
flags: "-f"
|
||||
- name: copy file with args
|
||||
uses: piersb/copy-file-action@allow-files-with-spaces
|
||||
with:
|
||||
source: "tests/path with spaces.txt"
|
||||
target: "path-without-spaces.txt"
|
||||
|
@ -1,4 +1,4 @@
|
||||
name: 'Copy file'
|
||||
name: 'Copy file (with spaces)'
|
||||
description: 'Copy local files'
|
||||
author: 'Ricardo Canastro'
|
||||
inputs:
|
||||
|
@ -1,3 +1,25 @@
|
||||
#!/bin/sh -l
|
||||
#!/bin/bash -l
|
||||
|
||||
cp $1 $2 $3
|
||||
#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"
|
1
tests/path with spaces.txt
Normal file
1
tests/path with spaces.txt
Normal file
@ -0,0 +1 @@
|
||||
Test file for copying a file with spaces in its path
|
Loading…
x
Reference in New Issue
Block a user