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

Push-AppveyorArtifact doesn't work with PowerShell Core #2183

Closed
JustArchi opened this issue Mar 17, 2018 · 9 comments
Closed

Push-AppveyorArtifact doesn't work with PowerShell Core #2183

JustArchi opened this issue Mar 17, 2018 · 9 comments

Comments

@JustArchi
Copy link

JustArchi commented Mar 17, 2018

The term 'Push-AppveyorArtifact' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\appveyor\AppData\Local\Temp\1\qjreu7wb1k.ps1:53 char:1
+ Get-Job | Receive-Job -AutoRemoveJob -Wait
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Push-AppveyorArtifact:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
+ PSComputerName        : localhost
 
Command exited with code 1

The same config works fine under ps, but not pwsh.

Ref: https://ci.appveyor.com/project/JustArchi/archisteamfarm/build/5133-master-osslgfoo/job/kl5oy8rc2h8yc18s#L273

@JustArchi
Copy link
Author

JustArchi commented Mar 17, 2018

Side note: as expected, this is entirely possible to workaround by renaming Push-AppveyorArtifact to appveyor PushArtifact, as the latter uses binary and not PS extension.

@bergmeister
Copy link

Note that I have used this with PowerShell Core in the Ubuntu images in the last month (but it broke with the recent update)

@JustArchi
Copy link
Author

To me it never worked in pwsh, but then again I build only on Windows.

@bergmeister
Copy link

bergmeister commented Jun 8, 2018

I see, on Windows I used Windows PowerShell just for this step, on Ubuntu, ps got automatically converted to pwsh

@JustArchi
Copy link
Author

@FeodorFitsner
Copy link
Member

@JustArchi The fix will be deployed today: #2513

@bergmeister
Copy link

@FeodorFitsner It seems, on Ubuntu, there is a problem with Push-AppveyorArtifact now, see this build

Push-AppveyorArtifact : Could not load file or assembly 'AppVeyor.BuildAgent.Utilities, Version=1.0.0.171, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
At /home/appveyor/projects/psscriptanalyzer/tools/appveyor.psm1:98 char:26
+     ) | ForEach-Object { Push-AppveyorArtifact $_.FullName }
+                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Push-AppVeyorArtifact], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,AppVeyor.BuildAgent.PowerShell.PushAppVeyorArtifactCmdlet
 
Build exited with code 1
Build failed

@FeodorFitsner
Copy link
Member

Will take a look.

@Wasapl
Copy link
Contributor

Wasapl commented Jul 19, 2018

@bergmeister should be good now. Can you please check the problem again?

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

4 participants