mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Report panic details (stack trace w/args&stdin) to clients; drop synccycles.StringGen() (moved to go-boilerplate)
This commit is contained in:
@@ -155,7 +155,7 @@ func getRemoteDataFromClient(sshClient *ssh.Client) (map[string]int64, map[strin
|
||||
return nil, nil, nil, nil, 0, 0, errors.New("unable to unmarshal server fetch response: " + err.Error())
|
||||
}
|
||||
if fetchResp.ErrMsg != nil {
|
||||
return nil, nil, nil, nil, 0, 0, errors.New("unable to complete fetch; server-side error occurred: " + *fetchResp.ErrMsg)
|
||||
return nil, nil, nil, nil, 0, 0, errors.New("unable to complete fetch; server-side error occurred: " + strings.ReplaceAll(*fetchResp.ErrMsg, global.FSSpace, "\n"))
|
||||
}
|
||||
|
||||
entryModMap := make(map[string]int64)
|
||||
|
||||
@@ -48,7 +48,7 @@ func ShearRemoteFromClient(vanityPath string, onlyShearAgeFile bool) error {
|
||||
return errors.New("unable to shear target remotely: " + err.Error())
|
||||
}
|
||||
if len(output) > 11 {
|
||||
return errors.New("unable to complete shear; server-side error occurred: " + string(output)[11:len(output)-2])
|
||||
return errors.New("unable to complete shear; server-side error occurred: " + strings.ReplaceAll(string(output)[11:len(output)-2], global.FSSpace, "\n"))
|
||||
}
|
||||
|
||||
// close the SSH client
|
||||
@@ -100,7 +100,7 @@ func RenameRemoteFromClient(oldVanityPath, newVanityPath string) error {
|
||||
return errors.New("unable to rename target remotely: " + err.Error())
|
||||
}
|
||||
if len(output) > 11 {
|
||||
return errors.New("unable to complete rename; server-side error occurred: " + string(output)[11:len(output)-2])
|
||||
return errors.New("unable to complete rename; server-side error occurred: " + strings.ReplaceAll(string(output)[11:len(output)-2], global.FSSpace, "\n"))
|
||||
}
|
||||
|
||||
// close the SSH client
|
||||
@@ -141,7 +141,7 @@ func AddFolderRemoteFromClient(vanityPath string) error {
|
||||
return errors.New("unable to add folder remotely: " + err.Error())
|
||||
}
|
||||
if len(output) > 11 {
|
||||
return errors.New("unable to complete addfolder; server-side error occurred: " + string(output)[11:len(output)-2])
|
||||
return errors.New("unable to complete addfolder; server-side error occurred: " + strings.ReplaceAll(string(output)[11:len(output)-2], global.FSSpace, "\n"))
|
||||
}
|
||||
|
||||
// close the SSH client
|
||||
|
||||
Reference in New Issue
Block a user