Skip to content

Commit

Permalink
Fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Jooseppi12 committed Oct 11, 2023
1 parent c2a67e8 commit 343f29a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions FileCompile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ module BuildHelpers =
(int ErrorCode.UnexpectedFinish)
let tryCheckVersion (proc: Process) (version: string) =
if version.StartsWith proc.MainModule.FileVersionInfo.FileVersion then
printfn "ATRHWBTRHRYH"
sendCompile proc |> Some
else
None
Expand All @@ -172,6 +173,7 @@ module BuildHelpers =
let m = regex.Match(nugetCache)
if m.Success then
let version = m.Groups.[1].Value
printfn "VERSION: %s" version
match Process.GetProcessesByName("wsfscservice") |> Array.tryPick (fun x -> tryCheckVersion x version) with
// wsfscservice process reported back, it doesn't have the project cached
| Error ErrorCode.ProjectNotCached ->
Expand All @@ -185,7 +187,9 @@ module BuildHelpers =
| Error ErrorCode.ProjectOutdated ->
PrintHelpers.info indent "Project's dependencies changed since last build. Fallback to \"dotnet build\"."
dotnetBuild()
| Some errorCode -> errorCode
| Some errorCode ->
printfn "%i" errorCode
errorCode
| None ->
PrintHelpers.info indent "No running wsfscservice found with the version %s. Fallback to \"dotnet build\"." version
dotnetBuild()
Expand All @@ -197,7 +201,7 @@ module BuildHelpers =
PrintHelpers.info indent "Couldn't read obj/project.nuget.cache (Unauthorized). Fallback to \"dotnet build\"."
dotnetBuild()
| :? FileNotFoundException | :? DirectoryNotFoundException ->
PrintHelpers.info indent "Cache file for downloaded nuget packages is not found. Starting an msbuild now."
PrintHelpers.info indent "Cache file for restored nuget packages is not found. Starting an msbuild now."
dotnetBuild()
| :? IOException ->
PrintHelpers.info indent "Couldn't read obj/project.nuget.cache. Fallback to \"dotnet build\"."
Expand All @@ -219,6 +223,7 @@ module BuildHelpers =
PrintHelpers.error indent "Error while building: %s." x.Message
1
finally
printfn "qw|EQWGTERAGHEs"
Environment.CurrentDirectory <- currentPath


Expand Down
2 changes: 1 addition & 1 deletion Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ let build indent (f: Process -> unit) (buildParams: ParseResults<BuildArguments>
PrintHelpers.info indent "Couldn't read obj/project.nuget.cache (Unauthorized). Fallback to \"dotnet build\"."
dotnetBuild()
| :? FileNotFoundException | :? DirectoryNotFoundException ->
PrintHelpers.info indent """Cache file for downloaded nuget packages is not found. Starting an msbuild now."""
PrintHelpers.info indent """Cache file for restored nuget packages is not found. Starting an msbuild now."""
dotnetBuild()
| :? IOException ->
PrintHelpers.info indent "Couldn't read obj/project.nuget.cache. Fallback to \"dotnet build\"."
Expand Down

0 comments on commit 343f29a

Please sign in to comment.