Skip to content

Commit 8e73642

Browse files
committed
Reject tilde in workspace path - won't expand remotely
Signed-off-by: Meng Xin <mxin@nvidia.com>
1 parent 8a3de6e commit 8e73642

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.claude/skills/common/remote_exec.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,13 @@ remote_load_cluster() {
223223
REMOTE_SLURM_ACCOUNT="$(_parse_yaml_value "$config_file" "clusters.${cluster_name}.slurm.default_account")"
224224
REMOTE_SLURM_PARTITION="$(_parse_yaml_value "$config_file" "clusters.${cluster_name}.slurm.default_partition")"
225225

226-
# Expand ~ in ssh_key
226+
# Expand ~ in paths
227227
if [[ "${REMOTE_SSH_KEY:-}" == "~/"* ]]; then
228228
REMOTE_SSH_KEY="${HOME}/${REMOTE_SSH_KEY#\~/}"
229229
fi
230+
if [[ "${REMOTE_WORKSPACE:-}" == "~/"* ]]; then
231+
REMOTE_WORKSPACE="${HOME}/${REMOTE_WORKSPACE#\~/}"
232+
fi
230233

231234
# Validate required fields
232235
if [[ -z "$REMOTE_HOST" ]]; then

0 commit comments

Comments
 (0)