Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

Commit 92e498e

Browse files
committed
Create tmp path on reload
1 parent 6f9795b commit 92e498e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

chang_compose.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def chang_error(message):
4444
chang_compose_file = sys.argv[1]
4545
chang_compose = yaml.load(file(chang_compose_file, 'r'))
4646

47+
os.system("mkdir -p {0}".format(CHANG_TMP_PATH))
48+
4749
env_file = open("{0}/environment".format(CHANG_TMP_PATH), "w")
4850
for line in chang_compose["environment"]:
4951
env_file.write("export {0}\n".format(line))

sources/chang

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ export CHANG_REV_PROXY_IMAGE=${CHANG_REV_PROXY_IMAGE:-majkel/chang-rev-proxy:ssl
4343
export CHANG_REV_PROXY_EXTRA_PORTS_PREFIX=${CHANG_REV_PROXY_EXTRA_PORTS_PREFIX:-808}
4444

4545
source .chang/environment
46-
mkdir -p $CHANG_TMP_PATH

sources/chang_reset.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ chang_reset() {
77
chang_notice "Resetting chang"
88
chang_notice "Current chang revision: $(chang_revision)"
99
chang_notice "Clearing current project's state"
10-
rm -rf $CHANG_STATE_PATH
1110
chang_notice "Removing all containers"
1211
chang_compose down --volumes --remove-orphans --timeout 3
1312
chang_notice "Removing all volumes"
@@ -19,6 +18,9 @@ chang_reset() {
1918
done < $CHANG_TMP_PATH/volumes | while read volume; do docker volume rm -f $volume; done
2019
)
2120

21+
rm -rf $CHANG_STATE_PATH
22+
rm -rf $CHANG_TMP_PATH
23+
2224
chang_notice "Reset complete"
2325
chang_notice "Run \`chang start\` to start the app"
2426
}

0 commit comments

Comments
 (0)