Skip to content

Commit

Permalink
Fix group support for update and remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof-Cieslak committed Apr 27, 2016
1 parent 3d5beda commit 4754692
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/paket.fs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ module PaketService =
|> Promise.success (handlePaketList)
|> window.Globals.showQuickPick
|> Promise.toPromise
|> Promise.success (fun n -> if JS.isDefined n then sprintf "update nuget %s" n |> spawnPaket)
|> Promise.success (fun n ->
if JS.isDefined n then
let group = n.Split(' ').[0].Trim()
let name = n.Split(' ').[1].Trim()
sprintf "update nuget %s group %s" name group |> spawnPaket)
|> ignore

let UpdatePackageCurrent () =
Expand All @@ -117,7 +121,11 @@ module PaketService =
|> Promise.success (handlePaketList)
|> window.Globals.showQuickPick
|> Promise.toPromise
|> Promise.success (fun n -> if JS.isDefined n then sprintf "update nuget %s project \"%s\"" fn n |> spawnPaket)
|> Promise.success (fun n ->
if JS.isDefined n then
let group = n.Split(' ').[0].Trim()
let name = n.Split(' ').[1].Trim()
sprintf "update nuget %s project \"%s\" group %s" name fn group |> spawnPaket)
|> ignore
else
window.Globals.showErrorMessage "fsproj file needs to be opened" |> ignore
Expand All @@ -128,7 +136,11 @@ module PaketService =
|> Promise.success (handlePaketList)
|> window.Globals.showQuickPick
|> Promise.toPromise
|> Promise.success (fun n -> if JS.isDefined n then sprintf "remove nuget %s" n |> spawnPaket)
|> Promise.success (fun (n :string) ->
if JS.isDefined n then
let group = n.Split(' ').[0].Trim()
let name = n.Split(' ').[1].Trim()
sprintf "remove nuget %s group %s" name group |> spawnPaket)
|> ignore

let RemovePackageCurrent () =
Expand All @@ -139,7 +151,11 @@ module PaketService =
|> Promise.success (handlePaketList)
|> window.Globals.showQuickPick
|> Promise.toPromise
|> Promise.success (fun n -> if JS.isDefined n then sprintf "remove nuget %s project \"%s\"" fn n |> spawnPaket)
|> Promise.success (fun n ->
if JS.isDefined n then
let group = n.Split(' ').[0].Trim()
let name = n.Split(' ').[1].Trim()
sprintf "remove nuget %s project \"%s\" group %s" name fn group |> spawnPaket)
|> ignore
else
window.Globals.showErrorMessage "fsproj file needs to be opened" |> ignore
Expand Down

0 comments on commit 4754692

Please sign in to comment.