From ad4a2103eaf714799c5b1247b34ad869ba574df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksander=20Skj=C3=A6veland=20Larsen?= Date: Thu, 18 Dec 2014 10:28:53 +0100 Subject: [PATCH] Support %HOME% variables containing spaces --- bin/agent.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/agent.cmd b/bin/agent.cmd index c12d329..4eaa614 100644 --- a/bin/agent.cmd +++ b/bin/agent.cmd @@ -38,8 +38,8 @@ REM Functions REM Check if ssh key has to be added :CHECKKEY SET VAR= -FOR /f "tokens=*" %%J IN ('ssh-add -l ^| grep soldat_rsa') DO SET VAR=%%J -IF "%VAR%" == "" SET KEYS=%KEYS% "%HOME%\.ssh\%1" +FOR /f "tokens=*" %%J IN ('ssh-add -l ^| grep "%1"') DO SET VAR=%%J +IF "%VAR%" == "" SET KEYS='%HOME%\.ssh\%1' %KEYS% GOTO:EOF :END