mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 10:32:59 +03:00
console log remove
This commit is contained in:
parent
945f945438
commit
4109fbd0e0
@ -9,6 +9,7 @@ async function main(args) {
|
||||
|
||||
let pos = getCursor()
|
||||
|
||||
setStdinFlag(ENABLE_STDIN)
|
||||
setStdinFlag(SILENT_STDIN)
|
||||
|
||||
while (true) {
|
||||
|
@ -25,7 +25,6 @@ async function processCommand(command, args) {
|
||||
await writeStdout("\nСтатус код: "+code+"\n")
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
await writeStdout("Не запустилася\n")
|
||||
}
|
||||
} else {
|
||||
@ -54,8 +53,6 @@ async function main(args) {
|
||||
await writeStdout(prompt.replace("{cwd}", cwd))
|
||||
|
||||
let command = await readLine((key, ctrl, alt, shift, content, pos) => {
|
||||
console.log(history, content, pos, key)
|
||||
|
||||
if (key == "ArrowDown") {
|
||||
history_index = Math.max(0, history_index - 1)
|
||||
return [history[history_index], history[history_index].length]
|
||||
|
@ -101,8 +101,6 @@ async function main(args) {
|
||||
let pkg = await getInstalledPackage(package["name"])
|
||||
await writeStdout(`Пакет ${pkg['name']}-${pkg['version']} обновлен\n`)
|
||||
break
|
||||
} else{
|
||||
console.log(status, repo, package)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +23,6 @@ async function readLine(on_key=(key, ctrl, alt, shift, content, pos) => [content
|
||||
while (true) {
|
||||
let event = await pollStdinEvent()
|
||||
|
||||
console.log(event)
|
||||
|
||||
if (event.type == "key") {
|
||||
if (event.key == "Backspace") {
|
||||
if (content.length >= 1) {
|
||||
@ -112,13 +110,13 @@ async function writeStdout(content) {
|
||||
}
|
||||
|
||||
function setStdinFlag(flag) {
|
||||
if (flag == 1) {
|
||||
if (flag == SILENT_STDIN) {
|
||||
silent_stdin = true
|
||||
} else if (flag == 2) {
|
||||
} else if (flag == RENDER_STDIN) {
|
||||
silent_stdin = false
|
||||
} else if (flag == 3) {
|
||||
} else if (flag == DISABLE_STDIN) {
|
||||
disable_stdin = true
|
||||
} else if (flag == 4) {
|
||||
} else if (flag == ENABLE_STDIN) {
|
||||
disable_stdin = false
|
||||
}
|
||||
}
|
||||
@ -136,7 +134,6 @@ function executeCommand(args, read=readStdin, write=writeStdout) {
|
||||
try {
|
||||
resolve(func(args, read, write))
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
reject(e)
|
||||
}
|
||||
}, 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user