diff --git a/src/app/Fake.Azure.Kudu/Kudu.fs b/src/app/Fake.Azure.Kudu/Kudu.fs index 5ef03316912..8991fe9a67e 100644 --- a/src/app/Fake.Azure.Kudu/Kudu.fs +++ b/src/app/Fake.Azure.Kudu/Kudu.fs @@ -17,7 +17,12 @@ let nextManifestPath = Environment.environVarOrDefault "NEXT_MANIFEST_PATH" Stri /// Used by KuduSync for tracking and diffing deployments. let previousManifestPath = Environment.environVarOrDefault "PREVIOUS_MANIFEST_PATH" String.Empty /// The path to the KuduSync application. -let kuduPath = (Environment.environVarOrDefault "GO_WEB_CONFIG_TEMPLATE" ".") |> Path.GetDirectoryName +let kuduPath = + Environment.environVarOrNone "GO_WEB_CONFIG_TEMPLATE" + |> function + | Some goWebConfigTemplate -> Path.GetDirectoryName goWebConfigTemplate + | None -> "." + |> DirectoryInfo.ofPath /// The different types of web jobs. type WebJobType = Scheduled | Continuous @@ -55,7 +60,7 @@ let kuduSync() = let result = Process.execWithResult(fun psi -> { psi with - FileName = Path.Combine(kuduPath, "kudusync.cmd") + FileName = Path.Combine(kuduPath.FullName, "kudusync.cmd") Arguments = Args.toWindowsCommandLine [ "-v"; "50"; "-f"; deploymentTemp; "-t"; deploymentTarget; "-n"; nextManifestPath; "-p"; previousManifestPath; "-i"; ".git;.hg;.deployment;deploy.cmd" ]}) (TimeSpan.FromMinutes 5.) result.Results |> Seq.iter (fun cm -> printfn "%O: %s" cm.Timestamp cm.Message)