Skip to content

Commit c3fe1b4

Browse files
committed
Update
1 parent c538533 commit c3fe1b4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

examples/syscall/06.windows_settime/Taskfile.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
version: '3'
44

5+
vars:
6+
select_object: Select-Object LastAccessTime,LastWriteTime,CreationTime | Format-List
7+
new_item_cmd: New-Item test.txt -ItemType File -Force | {{.select_object}}
8+
rm_item_cmd: Remove-Item test.txt -Force
9+
get_item_cmd: Get-Item test.txt | {{.select_object}}
10+
511
tasks:
612
default:
713
cmds:
8-
- powershell New-Item test.txt -ItemType File -Force
9-
- defer: powershell Remove-Item test.txt -Force
14+
- powershell "{{.new_item_cmd}}"
15+
- defer: powershell "{{.rm_item_cmd}}"
1016
- go run .
11-
- powershell "(Get-Item test.txt).LastAccessTime"
12-
- powershell "(Get-Item test.txt).LastWriteTime"
13-
- powershell "(Get-Item test.txt).CreationTime"
17+
- powershell "{{.get_item_cmd}}"

0 commit comments

Comments
 (0)