natevw opened a new issue #1757: Startup script breaks relative paths
URL: https://github.com/apache/couchdb/issues/1757
 
 
   <!--- Provide a general summary of the issue in the Title above -->
   
   ## Expected Behavior
   
   In CouchDB 1.x, I was able to use configuration like 
   
   ```
   [couchdb]
   database_dir = local_data/databases
   view_index_dir = local_data/databases
   
   [log]
   file = local_data/logs/couch.log
   ```
   
   and the daemon would find files relative to the startup path.
   
   I could configure a local repository with it's own CouchDB instance, start 
it with `couchdb -a local_data/couch.ini` and it would find everything relative 
to the launch directory.
   
   ## Current Behavior
   
   Now the `couchdb` startup script includes this logic:
   
   ```
   COUCHDB_BIN_DIR=$(cd "${0%/*}" && pwd)
   # …
   cd "$COUCHDB_BIN_DIR/../"
   ```
   As a result, any relative paths passed in the command line (e.g. 
`COUCHDB_ARGS_FILE`) or in the config files themselves tends to cause crashing 
and general upset.
   
   ## Possible Solution
   
   Is there a particular reason that this `cd` is now required? I'd be willing 
to try fix this but don't want to experiment much if there's now a subtle 
requirement for a particular working directory throughout the system now.
   
   ## Context
   
   Forcing absolute paths everywhere means that after bootstrapping the 
configuration, a developer will be unable to relocate the project/repo, lest 
they break the now-hardcoded paths to the configuration and log/database 
storage. With CouchDB 1.x this was not an issue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to