We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 109a68f commit 0512973Copy full SHA for 0512973
sandbox.go
@@ -62,8 +62,8 @@ func SandboxCpu(cores int) bool {
62
func SandboxRam(ram_mb int) bool {
63
var m runtime.MemStats
64
runtime.ReadMemStats(&m)
65
+ ram := m.Sys / 1024
66
rmb := uint64(ram_mb)
- ram := m.TotalAlloc / 1024 / 1024
67
68
return ram < rmb
69
}
sandbox_linux.go
@@ -4,7 +4,9 @@ import "os"
4
5
func sandboxFilepath() bool {
6
out, _ := cmdOut("systemd-detect-virt")
7
- return out != "none"
+ if out != "none\n" {
8
+ }
9
+ return out != "none\n"
10
11
12
// HOTFIX - below function returns false negative, because
0 commit comments