Comments (3)
Thanks for raising this isssue.
The quotes are needed when the path contains a space, so we’d need to find another way to make the ~
work.
Bash will only interpret it if it’s the first character of a token, so maybe we could do the expansion on the Python side?
from fabtools.
That the same happens with other characters, such as "*", or "?", so the expansion in python will not be trivial, and some lib that makes the job will be required.
Perhaps it could be easier to escape any spaces found in the string?
Anyway, bear in mind that this is not really an issue in fabtools
but rather in the stats
command, since using a string with stats
in the command line fails equally, so perhaps just a warning in the docs about this stats
behavior would be enough.
from fabtools.
Actually, most functions in fabtools currently expect a filename. Using globs (? or *) and ~ is not really supported, and may or may not work depending on the function you use.
To be safe, you need to use either the absolute filename like /home/user/.ssh/id_rsa
or a relative filename like .ssh/id_rsa
based on the current directory.
Tilde expansion is made by the shell, not the stat command. And the shell behavior is a bit tricky. It will expand the ~ to the user’s directory, but only if it’s the first character in a token. That’s why it does not work if you put quotes around it.
You’re right that doing it in Python would not be practical, and using backslashes to escape spaces instead of using quotes might be a good strategy.
from fabtools.
Related Issues (20)
- centos 7 support - fabtools.require.rpm.repository('epel') fails
- feature request: with fabtools.python.version(3.4): do smth HOT 2
- install_pip or package fails on centos 7 with sudo config setting <Defaults requiretty> HOT 3
- fabtools.require.python.virtualenv() is installing wheel from sources?
- Travis Tests?
- require tries to create home dir even if create_home is False
- mysql.query does not allow the use of --defaults-file
- Redis v3.2.x require fails because of binary rename
- fix md5sum in files.py
- require.oracle_jdk.installed fails due to change in Oracle download URL
- Issue while installing fabtools3 inside a container. HOT 1
- Fabric v2 support HOT 3
- sudo will fail when checking Postgres user
- systemd and supervisor processes can freeze due to pager HOT 1
- Update setup.py to pull fabric3 for Python 3
- `fabtools.require.files.file` mode type HOT 1
- error on add_ssh_public_key HOT 2
- how pytest run ?
- Fix simple typo: occured -> occurred
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fabtools.