[sourcefile] die on extension of invalid file

Reviewed By: rgrig

Differential Revision: D29485217

fbshipit-source-id: b871a13c7
master
Nikos Gorogiannis 3 years ago committed by Facebook GitHub Bot
parent 268015fbf3
commit 68356a40d2

@ -171,8 +171,9 @@ let to_string ?(force_relative = false) fname =
let has_extension ~ext = function
| Invalid _ ->
false
| Invalid {ml_source_file} ->
L.die InternalError
"has_extension cannot be called with Invalid source file originating in %s" ml_source_file
| RelativeProjectRootAndWorkspace {rel_path= path}
| HashedBuckOut path
| RelativeProjectRoot path

Loading…
Cancel
Save