public async Task AttachAsync(string targetPath, string unc, SmbShareCredential smbShareCredential)
        {
            using (var _s = logger.StepDebug(nameof(AttachAsync)))
            {
                // Ensure dir exists
                Directory.CreateDirectory(targetPath);
                var cmd = getLinuxConnectCmd(unc, targetPath, smbShareCredential);
                await cmdRunner.RunExecutable(cmd.Command, cmd.Arguments);

                _s.Commit();
            }
        }
 public Task <int> NonExistence(IExternalRunner runner) => runner.RunExecutable("nonexistence");
 public Task <int> Exit(IExternalRunner runner, int exitCode)
 => runner.RunExecutable("bash", "-c", "\"exit " + exitCode + "\"");
 public Task <int> Echo(IExternalRunner runner, string text) => runner.RunExecutable("echo", text);
Esempio n. 5
0
 public Task Attach(string targetPath, string deviceId)
 {
     return(runner.RunExecutable("mount", deviceId, targetPath));
 }
Esempio n. 6
0
 public static Task <int> RunBash(this IExternalRunner runner, string script)
 => runner.RunExecutable("bash", "-c", "\"" + script.Replace("\\", "\\\\") + "\"");
Esempio n. 7
0
 public static Task <int> RunPowershell(this IExternalRunner runner, string script)
 => runner.RunExecutable("powershell", "-Command", script);