CadQuery / CadQuery/cadquery

Error in run.sh for running CQ-editor

Open
#1,696 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

In `doc/installation.rst`, under the CQ-editor installation instructions, it says
```
To run from command.:

$HOME/cq-editor/run.sh
```
However if you try and run this command while not already inside the cq-editor directory, it fails.
```
birdpet@earth:~$ $HOME/cq-editor/run.sh

/home/birdpet/cq-editor/run.sh: 2: exec: bin/cq-editor: not found
```
`run.sh` runs `exec bin/cq-editor`, which is relative to the user's current directory, rather than the directory of the script. Either the documentation should be changed to tell users to first cd into the directory, or the contents of run.sh should be changed to something like the following:
```
#!/bin/bash
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )

cd "$parent_path"
exec bin/cq-editor
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.