Merge pull request #2253 from balena-io/2252-fix-ssh-service-list

ssh: fix incorrect service name parsing in local mode
This commit is contained in:
bulldozer-balena[bot] 2021-04-15 22:21:58 +00:00 committed by GitHub
commit 9fb62d92b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ export async function performLocalDeviceSSH(
});
const regex = new RegExp(`(^|\\/)${escapeRegExp(opts.service)}_\\d+_\\d+`);
const nameRegex = /\/?([a-zA-Z0-9_]+)_\d+_\d+/;
const nameRegex = /\/?([a-zA-Z0-9_-]+)_\d+_\d+/;
let allContainers: ContainerInfo[];
try {
allContainers = await docker.listContainers();