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

_cwd doesn't work with _fg #330

Closed
amoffat opened this issue Oct 31, 2016 · 5 comments
Closed

_cwd doesn't work with _fg #330

amoffat opened this issue Oct 31, 2016 · 5 comments
Assignees
Labels

Comments

@amoffat
Copy link
Owner

amoffat commented Oct 31, 2016

And I'm sure a few more useful options don't work with _fg either.

@amoffat amoffat added the bug label Oct 31, 2016
@amoffat amoffat added this to the release 1.12.0 milestone Oct 31, 2016
@amoffat
Copy link
Owner Author

amoffat commented Nov 27, 2016

cwd supported with fg

@amoffat amoffat closed this as completed Nov 27, 2016
@j-vizcaino
Copy link

Hello,

I stumbled upon this bug today.

Environment

  • MacOS 10.12.6
  • python 3.4.4
  • sh 1.12.14

How to reproduce

import sh

sh.ls(_cwd='/', _fg=True)

It prints the result of ls run is the current working dir, not /

@akhy
Copy link

akhy commented Dec 12, 2017

@amoffat @j-vizcaino I can reproduce it as well

  • macOS 10.12.5 and Debian Jessie
  • python 2.7.14 and 3.5.2
  • sh==1.12.14
from sh import pwd, mkdir

mkdir('-p', 'test')

pwd(_fg=True)  # output: /app (CORRECT)
pwd(_cwd='test', _fg=True)  # output: /app (WRONG, should be /app/test)
print(pwd(_cwd='test'))  # output: /app/test (CORRECT)

@jess-sol
Copy link

Also ran into this issue. Hopefully @amoffat can chime in as to whether it's a regression or intended behavior (sounds like the former?)

@amoffat amoffat reopened this May 27, 2019
@amoffat
Copy link
Owner Author

amoffat commented May 27, 2019

Seems like a regression, confirmed on Ubuntu

@amoffat amoffat self-assigned this Apr 26, 2020
@amoffat amoffat removed this from the release 1.12.0 milestone Apr 26, 2020
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