Git Product home page Git Product logo

Comments (6)

erikw avatar erikw commented on August 24, 2024

Can you run a minimal push script like the one I posted here?

#116 (comment)

from restic-automatic-backup-scheduler.

ScottyDoesKnow avatar ScottyDoesKnow commented on August 24, 2024

Same thing. I had uninstalled pwsh since it didn't do anything so I installed it again, opened a new git bash window but same result:

$ pwshtest.sh
bash: pwshtest.sh: command not found

from restic-automatic-backup-scheduler.

erikw avatar erikw commented on August 24, 2024

OK then the issue is scoped down to being able to run powershell in a shebang shell script.
https://stackoverflow.com/questions/48216173/how-can-i-use-a-shebang-in-a-powershell-script/48218913#48218913

I can't provide further support on this as I don't have access to a Windows installation at the moment. But please report back if you find the solution :)

from restic-automatic-backup-scheduler.

ScottyDoesKnow avatar ScottyDoesKnow commented on August 24, 2024

Alright, so in my defense, my only linux experience is a bit of messing around with a Raspberry Pi haha. So apparently there's a difference between running pwshtest.sh and ./pwshtest.sh. Changing that gave me this output:

$ ./pwshtest.sh
/usr/bin/env: ‘pwsh’: No such file or directory

And then installing pwsh through scoop gave me this output:

$ ./pwshtest.sh
Processing -File './pwshtest.sh' failed because the file does not have a '.ps1' extension. Specify a valid PowerShell script file name, and then try again.

So issue #116 was caused by not installing pwsh through scoop, adding that to step 2 in the Windows section should fix everything.

Edit: and of course after renaming the file to pwshtest.ps1:

$ ./pwshtest.ps1
pwsh works

from restic-automatic-backup-scheduler.

erikw avatar erikw commented on August 24, 2024

Aha! There we go. Thanks for debugging. I updated the README
1c0ba09

from restic-automatic-backup-scheduler.

ScottyDoesKnow avatar ScottyDoesKnow commented on August 24, 2024

Of course. Thanks for the ridiculously quick help!

from restic-automatic-backup-scheduler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.