Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 598718b

Browse files
committed
Compiler: Fix missing imports
1 parent aa1050f commit 598718b

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Compiler/main.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ from package import packageInstaller
1010
randomize()
1111

1212
# Windows-only
13-
if os.hostOS == "windows":
13+
when defined windows:
1414
discard execShellCmd("title NullRAT Builder")
1515
discard execShellCmd("chcp 65001 & color 4")
1616
discard execShellCmd("mode con: cols=80 lines=29")

Compiler/package.nim

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import std/terminal
22
import std/os
33
import std/osproc
44
import std/strutils
5+
import std/envvars
56
import std/streams
67
import puppy
78

@@ -46,11 +47,11 @@ proc packageInstaller*() =
4647
envPath = absolutePath("NR_VENV")
4748
scriptsPath = envPath / "Scripts"
4849

49-
if oldPath.isSome:
50-
setEnv("PATH", scriptsPath & PathSep & oldPath.get())
50+
if oldPath != "":
51+
putEnv("PATH", scriptsPath / oldPath)
5152
else:
52-
setEnv("PATH", scriptsPath)
53-
setEnv("VIRTUAL_ENV", envPath)
53+
putEnv("PATH", scriptsPath)
54+
putEnv("VIRTUAL_ENV", envPath)
5455

5556
discard execShellCmd("pip freeze") # DEBUG
5657

@@ -80,7 +81,7 @@ proc packageInstaller*() =
8081
echo "[INFO] Dependencies are not installed!\n"
8182
stdout.styledWriteLine({styleBright}, "[3] Installing/Updating dependencies...")
8283

83-
result = 0
84+
var result: int = 0
8485

8586
result = execShellCmd("pip install " & modules)
8687
if result != 0:

0 commit comments

Comments
 (0)