mirror of
https://github.com/go-task/task.git
synced 2025-07-03 00:57:02 +02:00
Remove deprecated "$" and "^" prefixes
`$` was a variable prefix that make it being evaluated as shell. It was replaced with `sh:`. `^` is a command prefix that make it run another task. It was replaced with `task:`. These were added long ago when we were experimenting with stuff and kept for some time for backward compatibility reasons, but sometimes causes confusion and I think the time to remove the code came. Closes #644 Closes #645 Ref #642 Co-authored-by: Trite <60318513+Trite8Q1@users.noreply.github.com>
This commit is contained in:
@ -1,9 +1,5 @@
|
||||
package taskfile
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Cmd is a task command
|
||||
type Cmd struct {
|
||||
Cmd string
|
||||
@ -23,11 +19,7 @@ type Dep struct {
|
||||
func (c *Cmd) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
var cmd string
|
||||
if err := unmarshal(&cmd); err == nil {
|
||||
if strings.HasPrefix(cmd, "^") {
|
||||
c.Task = strings.TrimPrefix(cmd, "^")
|
||||
} else {
|
||||
c.Cmd = cmd
|
||||
}
|
||||
c.Cmd = cmd
|
||||
return nil
|
||||
}
|
||||
var cmdStruct struct {
|
||||
|
Reference in New Issue
Block a user