fix(cli): auth file should be chmod 600 (#6925)

* wip new tests

* test for auth file mode

* check perms internally

* chore: lint
This commit is contained in:
Jonathan Jogenfors 2024-02-06 00:40:22 +01:00 committed by GitHub
parent 6ed33da2a4
commit ce6dc3b7af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 45 additions and 23 deletions

View file

@ -8,11 +8,11 @@ export abstract class BaseCommand {
protected user!: UserResponseDto;
protected serverVersion!: ServerVersionResponseDto;
constructor(options: { config?: string }) {
if (!options.config) {
constructor(options: { configDirectory?: string }) {
if (!options.configDirectory) {
throw new Error('Config directory is required');
}
this.sessionService = new SessionService(options.config);
this.sessionService = new SessionService(options.configDirectory);
}
public async connect(): Promise<void> {