chocolatey-community / simple-server

The Chocolatey Simple Server - https://community.chocolatey.org/packages/chocolatey.server
Apache License 2.0
44 stars 17 forks source link

New installation doesn't copy subfolders and files #18

Closed dfranciscus closed 6 years ago

dfranciscus commented 6 years ago

Seems that the app_data and contents folder do not copy to c:\tools\chocolatey.server from the package. Anyone else seeing this?

ferventcoder commented 6 years ago

Can you submit the install.log? It has some detail about what it copies and what it skips.

ferventcoder commented 6 years ago

Submit == provide the detailed part of the log starting at the point where it hands over to the PowerShell script, the one from the log file will have debug data.

ferventcoder commented 6 years ago

If App_Data exists, it will not copy it again - this prevents overwriting of the logs and existing packages.

ferventcoder commented 6 years ago

Not sure on contents, but a guess is that we did not set recurse properly when there are no contents in the tools folder and it creates it all.

Is there another subfolder?

ferventcoder commented 6 years ago

Specifically this line: https://github.com/chocolatey/simple-server/blob/910b10669a12a14d1b308cdd9291188a5b731830/nuget/tools/chocolateyInstall.ps1#L50

dfranciscus commented 6 years ago

@ferventcoder where is install.log located?

ferventcoder commented 6 years ago

My bad 😆, I totally meant the chocolatey.log, did not mean to put that dot in between install and log.

FLeven commented 6 years ago

Same problem here, installed 2.0 using the same dockerfile I used for 0.1.3 and the Folders: App_Data, Bin, Content were missing and accessing the page ended in a runtime error. I have fixed it by manualy moving the missing folders to C:\tools\chocolatey.server inside the container and it works now.

dfranciscus commented 6 years ago

chocolatey.log

@ferventcoder here you go

dfranciscus commented 6 years ago

@FLeven same worked for me. For the time being I just added code into the Puppet module to copy those as a work around.

ferventcoder commented 6 years ago
Container cannot be copied onto existing leaf item.
Container cannot be copied onto existing leaf item.

Found the issue. Copy-Item won't create the top level folder if it doesn't exist (even if you use -Force).

ferventcoder commented 6 years ago

Fixed in 0.2.1