fork-dev / Tracker

Bug and issue tracker for Fork for Mac
506 stars 12 forks source link

[Bug] Incorrect `${ref}` variable in the custom command #2069

Closed 3mini closed 6 months ago

3mini commented 7 months ago

Environment

Description

I made a custom command as below.

custom-commands.json ```json [ { "name" : "Custom Command", "target" : "repository", "ui" : { "buttons" : [ { "action" : { "script" : "echo $1{sha}\necho $1{sha:abbr}\necho $1{ref}\necho $1{ref:short}\necho $1{ref:full}", "showOutput" : true, "type" : "sh", "waitForExit" : true }, "title" : "OK" }, { "action" : { "type" : "cancel" }, "title" : "Cancel" } ], "controls" : [ { "dropdownType" : "references", "filter" : "refs\/tags\/", "title" : "Tag", "type" : "dropdown" } ], "description" : "", "title" : "Tag" } } ] ```

As shown in the screenshots, the selected tag name was expected to be used as the $1{ref} variable in the OK action, but it references a different value.

{ref} image image
DanPristupov commented 7 months ago

Thank you for reporting this. I've reproduced the problem.

DanPristupov commented 7 months ago

We just released Fork 2.40.2 with the fix. Please check for updates.

3mini commented 7 months ago

I've confirmed that the issue has been resolved. Thanks for your quick response.