Skip to content

Commit 255872e

Browse files
committed
Compatibility with Docker & show REPL for single usage without root account
1 parent 94434c1 commit 255872e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ function prepareSessions(home, single, callback)
7878
{
7979
if(error.code !== 'ENOENT') return callback(error)
8080

81+
if(single)
82+
{
83+
console.warn('Administrator account not found')
84+
85+
return startRepl('Administrator mode')
86+
}
87+
8188
return usersSessions(home, callback)
8289
}
8390

lib/jocker_root.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ function waitUntilDevMounted(path, tries, callback)
7272
{
7373
if(error) return callback(error)
7474

75-
if(files.length > 1) return callback()
75+
// Docker adds by default `console` device, and `pts` and `shm` directories
76+
if(files.length > 3) return callback()
7677

7778
if(tries-- <= 0) return callback(new Error(path+' not mounted'))
7879

0 commit comments

Comments
 (0)