Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix exception when dotnet cli is not installed. #1332

Merged
merged 1 commit into from
Jul 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/app/FakeLib/DotNetCLIHelper.fs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// Contains a task which can be used to run dotnet CLI commands.
module Fake.DotNet
module Fake.DotNetCli
Copy link
Member Author

@matthid matthid Jul 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@forki Is this OK? Its a breaking change, but the thing is new and it's currently colliding with my dotnetcore branch.
I really would like to have the Fake.DotNet namespace.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we only need to change that in chessie, argu and akka.net wire

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add a obsolete tag to make it a soft fail. We can then replace it later with whatever comes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@forki as note, Fake.DotNetSdk is better as name (dotnet cli was the old name, in docs now is .net core sdk)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol we just changed that

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sry, didint see this pr in time 😢

Np anyway, it's not that bad (i'd like more .net cli than .net sdk).
And maybe is going to change anyway, who knows 😄

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example Fake.DotnetCoreSdk the real name 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah @forki projects move too fast to handle ;)
I think dotnetcli is fine (the tool is called 'dotnet' and it's a command line interface). No idea what ms is doing...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They changed name after beta, 6 months ago.

I think we should try to use were possible to use the correct name.
That help new users, because it's easier to search docs.
That said I liked more dotnet cli a lot as name.

For example we should stop to say coreclr when we mean .net core ( coreclr+corefx).


open Fake
open System
Expand Down Expand Up @@ -43,13 +43,15 @@ let getVersion() =

/// Checks wether the dotnet CLI is installed
let isInstalled() =
let processResult =
ExecProcessAndReturnMessages (fun info ->
info.FileName <- commandName
info.WorkingDirectory <- Environment.CurrentDirectory
info.Arguments <- "--version") (TimeSpan.FromMinutes 30.)

processResult.OK
try
let processResult =
ExecProcessAndReturnMessages (fun info ->
info.FileName <- commandName
info.WorkingDirectory <- Environment.CurrentDirectory
info.Arguments <- "--version") (TimeSpan.FromMinutes 30.)

processResult.OK
with _ -> false

/// DotNet parameters
type CommandParams = {
Expand Down