(arg, options)
| 97 | }; |
| 98 | |
| 99 | const dockerLogs = async function (arg, options) { |
| 100 | let appName; |
| 101 | let commandRawArgsString = ''; |
| 102 | if (options.f) commandRawArgsString = ' -f'; |
| 103 | if (arg) { |
| 104 | appName = arg; |
| 105 | } |
| 106 | |
| 107 | if (!appName) { |
| 108 | let appPath = '.'; |
| 109 | let pkg = parsePackageFile(appPath); |
| 110 | appName = pkg.name; |
| 111 | } |
| 112 | |
| 113 | let command = exec(`docker logs ${appName}${commandRawArgsString}`, (err) => { |
| 114 | if (err) { |
| 115 | this.errorLog(`Failed to get logs for '${appName}' app. ` + err); |
| 116 | } |
| 117 | process.exit(); |
| 118 | }); |
| 119 | command.stdout.pipe(process.stdout); |
| 120 | command.stderr.pipe(process.stderr); |
| 121 | }; |
| 122 | |
| 123 | module.exports = { |
| 124 | dockerRestart, |
nothing calls this directly
no test coverage detected
searching dependent graphs…