We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d688652 commit 4bfe315Copy full SHA for 4bfe315
packages/cli-repl/test/e2e.spec.ts
@@ -709,6 +709,18 @@ describe('e2e', function() {
709
710
expect(await fs.readFile(historyPath, 'utf8')).to.match(/^a = 42$/m);
711
});
712
+
713
+ it('is only user-writable (on POSIX)', async function() {
714
+ if (process.platform === 'win32') {
715
+ return this.skip(); // No sensible fs permissions on Windows
716
+ }
717
718
+ await shell.executeLine('a = 42');
719
+ shell.writeInput('.exit\n');
720
+ await shell.waitForExit();
721
722
+ expect((await fs.stat(historyPath)).mode & 0o077).to.equal(0);
723
+ });
724
725
726
describe('mongoshrc', () => {
0 commit comments