You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val pwd: Path = os.Path(new java.io.File("").getCanonicalPath)
This can fail by:
: java.lang.ExceptionInInitializerError: null
: at os.proc$$anonfun$spawn$4.apply(ProcessOps.scala:219) ~[3rdparty.jvm.lihaoyi-os-lib-0.jar:?]
: at scala.Option.getOrElse(Option.scala:121) ~[3rdparty.jvm.enumeratum-2.jar:?]
: at os.proc.spawn(ProcessOps.scala:219) ~[3rdparty.jvm.lihaoyi-os-lib-0.jar:?]
: at os.proc.stream(ProcessOps.scala:101) ~[3rdparty.jvm.lihaoyi-os-lib-0.jar:?]
: at os.proc.call(ProcessOps.scala:61) ~[3rdparty.jvm.lihaoyi-os-lib-0.jar:?]
: Caused by: java.lang.IllegalArgumentException: requirement failed: ? is not an absolute path
: at scala.Predef$.require(Predef.scala:224) ~[3rdparty.jvm.enumeratum-2.jar:?]
: at os.Path.<init>(Path.scala:327) ~[3rdparty.jvm.lihaoyi-os-lib-0.jar:?]
: at os.Path$.apply(Path.scala:287) ~[3rdparty.jvm.lihaoyi-os-lib-0.jar:?]
: at os.package$.<init>(package.scala:19) ~[3rdparty.jvm.lihaoyi-os-lib-0.jar:?]
: at os.package$.<clinit>(package.scala) ~[3rdparty.jvm.lihaoyi-os-lib-0.jar:?]
Context: I was trying to us os.proc.call(), wrapped in a Try { } block in case it failed. Much to my surprise, this process died in prod with an exception that is excluded from NonFatal(), due apparently to os.File's constructor not liking the return value from new java.io.File("").getCanonicalPath apparently.
Ultimately, i expect that Path's constructor should not be throwing like this, so should probably be less sensitive to the underlying FS implementation perhaps?
This is with version 0.2.9 for scala 2.11
The text was updated successfully, but these errors were encountered:
Specifically
This can fail by:
Context: I was trying to us os.proc.call(), wrapped in a
Try { }
block in case it failed. Much to my surprise, this process died in prod with an exception that is excluded fromNonFatal()
, due apparently toos.File
's constructor not liking the return value fromnew java.io.File("").getCanonicalPath
apparently.I see you addressed a similar issue here:
com-lihaoyi/Ammonite#376
Ultimately, i expect that
Path
's constructor should not be throwing like this, so should probably be less sensitive to the underlying FS implementation perhaps?This is with version
0.2.9
for scala2.11
The text was updated successfully, but these errors were encountered: