mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Save one intermediate file
This commit is contained in:
parent
6e44bef6bd
commit
0d7fdb1abf
1 changed files with 1 additions and 2 deletions
|
@ -17,8 +17,7 @@ if [ -n "$uglyFiles" ]; then
|
|||
# Get crazy: backup the working copy of the file, paste the staged version in its place, prettify, add, restore backup
|
||||
backup=$(mktemp -p . $file.XXXXXXXXX)
|
||||
mv "$file" "$backup"
|
||||
staged "$file" > "$file"
|
||||
prettier --write "$file"
|
||||
staged "$file"|prettier --stdin-filepath "$file" > "$file"
|
||||
git add "$file"
|
||||
mv "$backup" "$file"
|
||||
echo "WARN: Working file restored"
|
||||
|
|
Loading…
Add table
Reference in a new issue