summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gitano/usercommand.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitano/usercommand.lua b/lib/gitano/usercommand.lua
index e33921a..f9ddf1d 100644
--- a/lib/gitano/usercommand.lua
+++ b/lib/gitano/usercommand.lua
@@ -255,13 +255,13 @@ end
local function update_htpasswd(user, passwd)
local htpasswd_path = os.getenv("HOME") .. "/htpasswd"
- local flags = io.open(htpasswd_path, "r") and "" or "-c"
+ local flags = io.open(htpasswd_path, "r") and "-i" or "-ic"
local exit_code
if passwd ~= '' then
local proc = subprocess.spawn_simple({
"htpasswd", flags, htpasswd_path, user,
- stdin = passwd .. '\n' .. passwd .. '\n',
+ stdin = passwd,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE
})