{"id":13454163,"url":"https://github.com/sindresorhus/sudo-block","last_synced_at":"2025-04-04T21:11:23.955Z","repository":{"id":9103769,"uuid":"10883930","full_name":"sindresorhus/sudo-block","owner":"sindresorhus","description":"Block users from running your app with root permissions","archived":false,"fork":false,"pushed_at":"2023-08-31T16:06:10.000Z","size":74,"stargazers_count":98,"open_issues_count":0,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-28T20:11:13.506Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null,"governance":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2013-06-23T12:21:28.000Z","updated_at":"2024-08-03T23:48:06.000Z","dependencies_parsed_at":"2022-08-27T23:20:43.465Z","dependency_job_id":"9987fd89-b307-4183-8b62-bfde0c0d2994","html_url":"https://github.com/sindresorhus/sudo-block","commit_stats":{"total_commits":38,"total_committers":6,"mean_commits":6.333333333333333,"dds":"0.21052631578947367","last_synced_commit":"e192950b08994f7aee389092985a85428c03d205"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fsudo-block","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fsudo-block/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fsudo-block/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fsudo-block/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/sudo-block/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249533,"owners_count":20908212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:00:51.504Z","updated_at":"2025-04-04T21:11:23.936Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","readme":"# sudo-block\n\n\u003e Block users from running your app with root permissions\n\n\u003cimg src=\"screenshot.png\" width=\"660\"\u003e\n\n## Install\n\n```sh\nnpm install sudo-block\n```\n\n## Usage\n\n```js\nimport sudoBlock from 'sudo-block';\n\nsudoBlock();\n```\n\n## API\n\n### sudoBlock(message?)\n\nWhen a file containing this function is run with root permissions it will exit and show an error message telling the user how to fix the problem, so they don't have to run it with `sudo`.\n\n#### message\n\nType: `string`\n\nA custom message.\n","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["Packages","包","目录","Command-line utilities"],"sub_categories":["Command-line utilities","命令行工具","命令行实用工具"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fsudo-block","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fsudo-block","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fsudo-block/lists"}