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

paket pack fails if output is underneath source directory #1473

Closed
michael-baker opened this issue Feb 14, 2016 · 0 comments
Closed

paket pack fails if output is underneath source directory #1473

michael-baker opened this issue Feb 14, 2016 · 0 comments
Labels

Comments

@michael-baker
Copy link

If the output directory of paket pack is underneath the source directory the operation will fail with the error The process cannot access the file 'C:\Temp\pakettest\o\Foo.1.nupkg' because it is being used by another process.

Consider this PowerShell script which reproduces the issue

cd C:\Temp\pakettest

"
type file
id Foo
authors Bar
description FooPackage
version 1
files
    !*paket.*
    ** ==> lib
" | Out-File "paket.template"

"source https://www.nuget.org/api/v2" | Out-File "paket.dependencies"

$lock = "" | Out-File "paket.lock"

$somecontent = Out-File "mycontent.txt"

Invoke-Expression "cmd /c C:\Temp\pakettest\paket.exe pack templatefile paket.template output o"

To run this script create C:\Temp\pakettest and drop paket.exe into this directory.

Because "o" is located under the source directory, Paket will try and package it - which of course fails. I propose the output directory is always excluded from packaging, otherwise you need to specify !**\o\** explicitly which feels like a waste of characters or you need to ensure the output is above the source directory

forki added a commit that referenced this issue Feb 14, 2016
@forki forki closed this as completed in d1771c4 Feb 14, 2016
@forki forki added the bug label Feb 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants