@@ -27,8 +27,9 @@ type Input struct {
27
27
func InputFromString (s string , l lock.Locker ) * Input {
28
28
u , _ := url .Parse (s )
29
29
if u .Path == "" && u .Opaque != "" && u .Scheme == "path" {
30
- u .Path = filepath .Join (l .ProjectDir (), u .Opaque )
31
- u .Opaque = ""
30
+ // This normalizes url paths to be absolute. It also ensures all
31
+ // path urls have a single slash (instead of possibly 3 slashes)
32
+ u , _ = url .Parse ("path:" + filepath .Join (l .ProjectDir (), u .Opaque ))
32
33
}
33
34
return & Input {* u , l }
34
35
}
@@ -136,19 +137,18 @@ func (i *Input) PackageAttributePath() (string, error) {
136
137
strings .Join (lo .Keys (infos ), ", " )
137
138
}
138
139
return "" , usererr .New (
139
- "Flake \" %s\" is ambiguous. %s" ,
140
+ "Package \" %s\" is ambiguous. %s" ,
140
141
i .String (),
141
142
outputs ,
142
143
)
143
144
}
144
145
145
- return "" , usererr .New ("Flake \" %s\" was not found" , i .String ())
146
+ return "" , usererr .New ("Package \" %s\" was not found" , i .String ())
146
147
}
147
148
148
149
func (i * Input ) urlWithoutFragment () string {
149
150
u := i .URL // get copy
150
151
u .Fragment = ""
151
- // This will produce urls with extra slashes after the scheme, but that's ok
152
152
return u .String ()
153
153
}
154
154
@@ -161,7 +161,7 @@ func (i *Input) hash() string {
161
161
}
162
162
163
163
func (i * Input ) validateExists () (bool , error ) {
164
- if i .IsDevboxPackage () {
164
+ if i .isVersioned () {
165
165
version := i .version ()
166
166
if version == "" && i .isVersioned () {
167
167
return false , usererr .New ("No version specified for %q." , i .Path )
0 commit comments