oven-sh/bun · error
usage: ptyrun <command> [args...]
Error message
usage: ptyrun <command> [args...]
What it means
Error "usage: ptyrun <command> [args...] " thrown in oven-sh/bun.
Source
Thrown at scripts/orderfile/ptyrun.c:39
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
#include <unistd.h>
#if defined(__APPLE__)
#include <util.h>
#define PRELOAD_VAR "DYLD_INSERT_LIBRARIES"
#else
#include <pty.h>
#define PRELOAD_VAR "LD_PRELOAD"
#endif
#define EOT 4 // ^D: how a terminal says end-of-input
int main(int argc, char **argv)
{
if (argc < 2) {
fprintf(stderr, "usage: ptyrun <command> [args...]\n");
return 2;
}
struct winsize window = { .ws_row = 24, .ws_col = 80 };
int master = -1;
pid_t child = forkpty(&master, NULL, NULL, &window);
if (child < 0) {
perror("forkpty");
return 2;
}
if (child == 0) {
const char *preload = getenv("PTYRUN_PRELOAD");
if (preload && *preload) setenv(PRELOAD_VAR, preload, 1);
execvp(argv[1], &argv[1]);
perror(argv[1]);
_exit(127);
}
View on GitHub (pinned to 8c5296ac45)
When it happens
Trigger: Thrown at scripts/orderfile/ptyrun.c:39 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/6b358e22f9c608f9.
Report an issue: GitHub.