mirror of
https://github.com/go-task/task.git
synced 2026-06-26 14:16:16 +00:00
update deps
This commit is contained in:
5
vendor/github.com/Masterminds/semver/CHANGELOG.md
generated
vendored
5
vendor/github.com/Masterminds/semver/CHANGELOG.md
generated
vendored
@@ -1,3 +1,8 @@
|
||||
# 1.3.1 (2017-07-10)
|
||||
|
||||
## Fixed
|
||||
- Fixed #57: number comparisons in prerelease sometimes inaccurate
|
||||
|
||||
# 1.3.0 (2017-05-02)
|
||||
|
||||
## Added
|
||||
|
||||
23
vendor/github.com/Masterminds/semver/version.go
generated
vendored
23
vendor/github.com/Masterminds/semver/version.go
generated
vendored
@@ -394,8 +394,29 @@ func comparePrePart(s, o string) int {
|
||||
return -1
|
||||
}
|
||||
|
||||
if s > o {
|
||||
// When comparing strings "99" is greater than "103". To handle
|
||||
// cases like this we need to detect numbers and compare them.
|
||||
|
||||
oi, n1 := strconv.ParseInt(o, 10, 64)
|
||||
si, n2 := strconv.ParseInt(s, 10, 64)
|
||||
|
||||
// The case where both are strings compare the strings
|
||||
if n1 != nil && n2 != nil {
|
||||
if s > o {
|
||||
return 1
|
||||
}
|
||||
return -1
|
||||
} else if n1 != nil {
|
||||
// o is a string and s is a number
|
||||
return -1
|
||||
} else if n2 != nil {
|
||||
// s is a string and o is a number
|
||||
return 1
|
||||
}
|
||||
// Both are numbers
|
||||
if si > oi {
|
||||
return 1
|
||||
}
|
||||
return -1
|
||||
|
||||
}
|
||||
|
||||
9
vendor/github.com/mvdan/sh/syntax/parser.go
generated
vendored
9
vendor/github.com/mvdan/sh/syntax/parser.go
generated
vendored
@@ -623,6 +623,12 @@ func (p *Parser) wordPart() WordPart {
|
||||
cs.Right = p.matched(cs.Left, leftParen, rightParen)
|
||||
return cs
|
||||
case dollar:
|
||||
r := p.r
|
||||
if r == utf8.RuneSelf || wordBreak(r) || r == '"' || r == '\'' || r == '`' || r == '[' {
|
||||
l := p.lit(p.pos, "$")
|
||||
p.next()
|
||||
return l
|
||||
}
|
||||
p.ensureNoNested()
|
||||
return p.shortParamExp()
|
||||
case cmdIn, cmdOut:
|
||||
@@ -963,9 +969,6 @@ func (p *Parser) shortParamExp() *ParamExp {
|
||||
p.quote = paramName
|
||||
p.advanceLitOther(p.r)
|
||||
p.quote = old
|
||||
if p.val == "" || p.val == "\x80" {
|
||||
p.posErr(pe.Dollar, "$ literal must be escaped or single-quoted")
|
||||
}
|
||||
}
|
||||
pe.Param = p.getLit()
|
||||
return pe
|
||||
|
||||
Reference in New Issue
Block a user