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

win10 just 0.10.6 sed output / .user.profile convention #1077

Closed
davehorner opened this issue Jan 30, 2022 · 6 comments
Closed

win10 just 0.10.6 sed output / .user.profile convention #1077

davehorner opened this issue Jan 30, 2022 · 6 comments

Comments

@davehorner
Copy link

Installed just via cargo. Running the version command works fine and doesn't say anything about sed.

# just --version
just 0.10.6
# where just
C:\Users\dhorner\.cargo\bin\just.exe

using the keybase example renamed to justfile. The default recipe works fine. With no arguments in a directory with no justfile, I get information about a sed invalid option E and something about "cargo ltest". I have no idea why I would be getting any output from sed?!

# just
sed: invalid option -- E
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...

  -n, --quiet, --silent
                 suppress automatic printing of pattern space
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  -c  --nocr     turn off \r$ translation; must be first switch on command line
      --help     display this help and exit
  -V, --version  output version information and exit

If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.

E-mail bug reports to: [email protected] .
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
cargo ltest
error: no such subcommand: `ltest`

        Did you mean `test`?
error: Recipe `test` failed on line 18 with exit code 101

@casey
Copy link
Owner

casey commented Jan 30, 2022

Are you calling just from a checkout of the just project itself? If so, then you have the project justfile in a parent directory, which calls sed -E.

@davehorner
Copy link
Author

Thank you, that was what I was running into! :)

I am trying to get system wide recipes via a .user.justfile in my %USERPROFILE% directory. just is not seeing the recipes in the .user.justfile.

@casey
Copy link
Owner

casey commented Jan 31, 2022

Thank you, that was what I was running into! :)

Nice, glad you got it working.

I am trying to get system wide recipes via a .user.justfile in my %USERPROFILE% directory. just is not seeing the recipes in the .user.justfile.

You'll need to invoke just via an alias to pick up those recipes:

alias .j='just --justfile ~/.user.justfile --working-directory .'

@casey casey closed this as completed Jan 31, 2022
@davehorner
Copy link
Author

davehorner commented Jan 31, 2022

Is there an issue with having just pull in the .user justfile automatically?

alias / doskey / Set-Alias etc work in the shell but not ideal (invoking from script using system just); would expect user profile files to apply to the user.

--justfile ~/.user.justfile is a strange convention if it requires it to be fully specified.

@casey
Copy link
Owner

casey commented Jan 31, 2022

I think this comes closest: #1036

It would allow putting fallback recipes in ~/.justfile.

@davehorner davehorner changed the title win10 just 0.10.6 sed output in empty just invocation. win10 just 0.10.6 sed output / .user.profile convention Feb 1, 2022
@davehorner
Copy link
Author

I'm uncertain at this time how to go about doing that. I will watch the issue; it's really not a huge deal, I was just interested to see how the profile would work. thanks for the responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants