File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 55 |> SSHKit.Context . path ( "/tmp" )
66 |> SSHKit.Context . user ( "other" )
77 |> SSHKit.Context . group ( "other" )
8+ |> SSHKit.Context . umask ( "0077" )
89
910defmodule Xfer do
1011 # https://github.com/erlang/otp/blob/OTP-23.2.1/lib/ssh/src/ssh.hrl
2829 # In case of failed upload, check command output:
2930 # IO.inspect(SSHKit.Channel.recv(chan))
3031
31- { :ok , tar } = :erl_tar . init ( self ( ) , :write , fn
32- :position , { _ , position } ->
32+ { :ok , tar } = :erl_tar . init ( chan , :write , fn
33+ :position , { ^ chan , position } ->
3334 # IO.write("tar position: #{inspect(position)}")
3435 { :ok , 0 }
3536
36- :write , { _ , data } ->
37+ :write , { ^ chan , data } ->
3738 :ok = SSHKit.Channel . send ( chan , Xfer . to_binary ( data ) )
3839 :ok
3940
40- :close , _ ->
41+ :close , ^ chan ->
4142 :ok = SSHKit.Channel . eof ( chan )
4243 :ok
4344 end )
You can’t perform that action at this time.
0 commit comments