Code Monkey home page Code Monkey logo

Comments (5)

markstos avatar markstos commented on July 20, 2024

@mfn You can search for working_directory in this repo to find out how it is used. It works just like you think: It's used to cd into that directory and that's it. Your problem may be elsewhere.

cd $INPUT_WORKING_DIRECTORY

from prettier_action.

mfn avatar mfn commented on July 20, 2024

@markstos thank you, good point!

But looking a few lines above, isn't the issue the the action changes into its own action directory first so working_directory is relative to that and not to the project being checked out?

cd "$GITHUB_ACTION_PATH"
echo "Installing prettier..."
case $INPUT_WORKING_DIRECTORY in
false)
;;
*)
cd $INPUT_WORKING_DIRECTORY

So relative paths are relative to this action and would make sense why something like working_directory: subdir/ won't work, as GITHUB_ACTION_PATH is documented being

The path where an action is located. This property is only supported in composite actions. You can use this path to access files located in the same repository as the action. For example, /home/runner/work/_actions/repo-owner/name-of-action-repo/v1.

vs. what this action documents (emphasis mine):

Specify a directory to cd into before installing prettier and running it, use relative file path to the repository root for example app/

Can't make sense why my version with the absolute path wouldn't work though.

I'd say that, for relative paths, at least that's unexpected / a bug somewhere?

from prettier_action.

markstos avatar markstos commented on July 20, 2024

If the "working_directory" is not resolved relative to the project root, that seems like a bug to me.

I ran into my own path-related problem with a file-not-found error that doesn't tell me which file is not found. Nice tool, but still some rough edges here.

#91

from prettier_action.

quinn-dougherty avatar quinn-dougherty commented on July 20, 2024

Desired behavior is for working_directory to be relative to root project dir, basically wherever the .git directory is.

from prettier_action.

lnxd avatar lnxd commented on July 20, 2024

Anyone who lands here, might be worth checking my comment at #94 (comment)

from prettier_action.

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.