AutoSPSourceBuilder icon indicating copy to clipboard operation
AutoSPSourceBuilder copied to clipboard

Error in step Adding a version history file _UPDATE_HISTORY.txt

Open mco84 opened this issue 5 years ago • 2 comments

I think there's a hard coded base path somewhere in the scripte when using the UpdateLocation parameter. So when I'm using a different then the default path C:\SP\SP2019 in the very end of the process this happens:

Set-Content : Could not find a part of the path 'C:\SP\2019\_UPDATE_HISTORY.txt'.
At P:\SP-Test\AutoSPSourceBuilder\AutoSPSourceBuilder.ps1:1083 char:5
+     Set-Content -Path "$Destination\$textFileName" -Value "This media ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\SP\2019\_UPDATE_HISTORY.txt:String) [Set-Content], DirectoryNotFoundExcep
   tion
    + FullyQualifiedErrorId : GetContentWriterDirectoryNotFoundError,Microsoft.PowerShell.Commands.SetContentCommand

Add-Content : Could not find a part of the path 'C:\SP\2019\_UPDATE_HISTORY.txt'.
At P:\SP-Test\AutoSPSourceBuilder\AutoSPSourceBuilder.ps1:1085 char:1
+ Add-Content -Path "$Destination\$textFileName" -Value "-------------- ...

mco84 avatar Oct 10 '19 06:10 mco84

Yes this is what $Destination defaults to if you don't specify a path for it in the command line.

brianlala avatar Jan 14 '20 17:01 brianlala

I need to test this again. You see some time has passed and what I remember it was a strange error I haven't had in similar constellations. I will let you know what I find out.

mco84 avatar Jan 17 '20 14:01 mco84