- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 750
Open
Labels
state: needs triageWaiting to be triaged by a maintainer.Waiting to be triaged by a maintainer.
Description
Description
- The new built-in cpcommand to copy a file that may or may not exist, with theignore_error: trueproperty set on thecmd:scope
- Expected cpcommand errors to be suppressed
- cperrors were not suppressed and tasks fail
- No change if -fis used or not.
- Adding powershellbefore thecpcommand works as expected even if the powershell command fails.
This task is just a best-effort file copy for some testing, and some files may not exist for now, and simply suppressing the error is the simplest solution for now.
Example error
task: Failed to run task "dev-plugins-fetch": GetFileAttributesEx C:\tests\config\Essentials.Accounts.json: The system cannot find the file specified.
Version
3.45.4
Operating system
Windows
Experiments Enabled
None
Example Taskfile
version: 3
tasks:
  default:
    cmds:
     - task: dev-build-plugin
       vars:
         ASM_NAME: "TestAssembly"
         OUTPUT_DIR: "{{ .USER_WORKING_DIR }}"
  dev-build-plugin:
    internal: true
    dir: '..'
    requires: { ASM_NAME, OUTPUT_DIR}
    cmds:
     - cmd: mkdir -p '{{ .OUTPUT_DIR }}'
     - cmd: cp -f config/{{ .ASM_NAME }}.json '{{ .OUTPUT_DIR }}/{{ .ASM_NAME }}.json'
       ignore_error: trueMetadata
Metadata
Assignees
Labels
state: needs triageWaiting to be triaged by a maintainer.Waiting to be triaged by a maintainer.