Append workspace basename to guest_path
This commit is contained in:
parent
7864673dcb
commit
3e772152ad
1 changed files with 7 additions and 3 deletions
10
bin/qvm-run
10
bin/qvm-run
|
|
@ -59,8 +59,10 @@ EOF
|
|||
register_workspace() {
|
||||
local workspace_path="$1"
|
||||
local hash="$2"
|
||||
local dir_name
|
||||
dir_name=$(basename "$workspace_path")
|
||||
local mount_tag="ws_${hash}"
|
||||
local guest_path="/workspace/${hash}"
|
||||
local guest_path="/workspace/${hash}_${dir_name}"
|
||||
|
||||
# Create workspaces.json if it doesn't exist
|
||||
if [[ ! -f "$QVM_WORKSPACES_FILE" ]]; then
|
||||
|
|
@ -172,11 +174,13 @@ main() {
|
|||
local workspace_path
|
||||
workspace_path="$(pwd)"
|
||||
|
||||
# Generate workspace hash
|
||||
# Generate workspace hash and guest path
|
||||
local hash
|
||||
hash=$(workspace_hash "$workspace_path")
|
||||
local dir_name
|
||||
dir_name=$(basename "$workspace_path")
|
||||
|
||||
local guest_path="/workspace/${hash}"
|
||||
local guest_path="/workspace/${hash}_${dir_name}"
|
||||
|
||||
log_info "Workspace: $workspace_path"
|
||||
log_info "Guest path: $guest_path"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue