Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add OutputPath back to RestoreArgs
  • Loading branch information
theimowski committed Apr 8, 2019
commit a57c43fe22438bd5f881dbcb0ea23714a0c5efc8
2 changes: 2 additions & 0 deletions src/Paket/Commands.fs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ type RestoreArgs =
| [<Hidden;CustomCommandLine("--references-files")>] References_File_Legacy of path:string list

| [<Unique>] Target_Framework of framework:string
| [<Unique>] Output_Path of path:string
with
interface IArgParserTemplate with
member this.Usage =
Expand All @@ -317,6 +318,7 @@ with
| References_File_Legacy(_) -> "[obsolete]"

| Target_Framework(_) -> "restore only for the specified target framework"
| Output_Path(_) -> "Output path directory of MSBuild. When used in combination with the new dotnet cli based sdk, paket will write supporting files (nuget.config, paket.resolved) there"

type SimplifyArgs =
| [<Unique;AltCommandLine("-i")>] Interactive
Expand Down
7 changes: 4 additions & 3 deletions src/Paket/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -426,15 +426,16 @@ let restore (results : ParseResults<_>) =
let ignoreChecks = results.Contains <@ RestoreArgs.Ignore_Checks @>
let failOnChecks = results.Contains <@ RestoreArgs.Fail_On_Checks @>
let targetFramework = results.TryGetResult <@ RestoreArgs.Target_Framework @>
let outputPath = results.TryGetResult <@ RestoreArgs.Output_Path @>

match project with
| Some project ->
Dependencies.Locate().Restore(force, group, project, touchAffectedRefs, ignoreChecks, failOnChecks, targetFramework, None)
Dependencies.Locate().Restore(force, group, project, touchAffectedRefs, ignoreChecks, failOnChecks, targetFramework, outputPath)
| None ->
if List.isEmpty files then
Dependencies.Locate().Restore(force, group, installOnlyReferenced, touchAffectedRefs, ignoreChecks, failOnChecks, targetFramework, None)
Dependencies.Locate().Restore(force, group, installOnlyReferenced, touchAffectedRefs, ignoreChecks, failOnChecks, targetFramework, outputPath)
else
Dependencies.Locate().Restore(force, group, files, touchAffectedRefs, ignoreChecks, failOnChecks, targetFramework, None)
Dependencies.Locate().Restore(force, group, files, touchAffectedRefs, ignoreChecks, failOnChecks, targetFramework, outputPath)

let simplify (results : ParseResults<_>) =
let interactive = results.Contains <@ SimplifyArgs.Interactive @>
Expand Down