Include host directory name in workspace GuestPath
This commit is contained in:
parent
19f67670ab
commit
37770e741d
1 changed files with 2 additions and 1 deletions
|
|
@ -102,11 +102,12 @@ func (r *Registry) Register(hostPath string) mo.Result[*Workspace] {
|
|||
}
|
||||
|
||||
hash := Hash(absPath)
|
||||
dirName := filepath.Base(absPath)
|
||||
ws := Workspace{
|
||||
HostPath: absPath,
|
||||
Hash: hash,
|
||||
MountTag: fmt.Sprintf("ws_%s", hash),
|
||||
GuestPath: fmt.Sprintf("/workspace/%s", hash),
|
||||
GuestPath: fmt.Sprintf("/workspace/%s-%s", hash, dirName),
|
||||
}
|
||||
|
||||
r.workspaces[absPath] = ws
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue