Commit Graph
170 Commits
Author SHA1 Message Date
Richard Kuhnt ff9c0c3daf parse_app(): fix for relative paths 2018-05-07 14:18:40 +02:00
Richard Kuhnt 70f64c8f4b Refactor app() to parse_app() for better "bucket/app@version" handling (#2234)
It now parses these app names:
- php-bucket/php71-amqp@1.8.0
- php-bucket/php71-amqp
- php71-amqp@1.8.0
- php71-amqp@1.9.0-rc2

Removed:
- is_app_with_specific_version()
- get_app_with_version()
2018-05-04 21:51:43 +02:00
Ross Smith II 0e2c253f38 Warn on shim overwrite (#2033) 2018-05-04 20:02:16 +02:00
Vladimir Chebotarev 3e14f37b3f Enabled shimming of external applications (#2072)
* Enabled shimming of external applications

* Improved correctness of target binding at shimming point.

* Fixed '| % { return ... }' issue.
2018-05-04 19:17:23 +02:00
Vladimir Chebotarev 6236750011 Fixed ps1/jar->ps1 shims args handling. (#2120) 2018-05-04 19:16:45 +02:00
Vladimir Chebotarev 563a1730a4 Temporary fixed passing arguments to ps1 shims. (#2118) 2018-05-04 19:16:35 +02:00
Steve Baker 9eca252913 wraptext: use buffer width instead of window width (fixes #2190) (#2191)
There exist two size properties in `$host.ui.rawui`, `windowsize` and
`buffersize`. PowerShell ISE doesn't support windowsize, causing
`wraptext` to incorrectly wrap in ISE. (#2190).

In the modern Windows 10 console (and eg the terminal in vscode), the
widths of buffersize and windowsize are always the same.

This change only affects users using pre-Windows 10 conhost, or the
Windows 10 conhost in legacy mode; and furthermore only if they have the
console window sized narrower than the buffer size (giving a horizontal
scroll bar). In this situation, all text in the console is suboptimally
displayed anyway.
2018-04-12 20:29:27 +02:00
Richard Kuhnt f3f559c460 Improve is_scoop_outdated() and add last_scoop_update() 2018-03-21 17:09:11 +01:00
Richard Kuhnt 12962acfa8 Use consistent User-Agent Header on all webrequests 2018-03-18 16:35:01 +01:00
Chawye Hsu 731247876d [Pending] Finally we add the code linting and its tests! (#2108)
* Lint: PSPossibleIncorrectComparisonWithNull

* Lint: PSUseLiteralInitializerForHashtable

* Lint: PSUseBOMForUnicodeEncodedFile

* Lint: PSUseApprovedVerbs

* Lint: PSAvoidGlobalVars

* Lint: PSAvoidUsingEmptyCatchBlock

* Lint: PSUseShouldProcessForStateChangingFunctions

* Lint helper: Add PSScriptAnalyzer integration for vscode

* Fix lint: PSUseBOMForUnicodeEncodedFile

* Tests: ignore previous TestResults.xml

* Tests: add PowerShell script linting into tests!

* Add PSScriptAnalyzer into appveyor ci

* Update Scoop-Linting.Tests.ps1
2018-03-13 14:26:55 +01:00
Pierre CHARLES 071af50671 Added retry when unzip fail because of AV (#1822) 2018-03-12 21:23:21 +01:00
Milan Gardian 63b325c4cb Fix "enable-encryptionscheme" for OSes before Windows 10 (#2084)
* Fix "enable-encryptionscheme" for OSes before Windows 10

- Tested on Windows 8.1 and Windows 10
- Also fixes indentation + clarifying comment

* Declare type of "enable-encryptionscheme" parameter instead of casting
2018-03-04 14:07:07 +01:00
Chawye Hsu e1bb1e91d0 Lint: PSAvoidUsingCmdletAliases (#2075) 2018-03-03 18:41:19 +01:00
Asad Saeeduddin 039f28b109 Enable TLS 1.2 in core.ps1 (#2074)
Enable TLS 1.2 in core.ps1
2018-03-02 06:04:25 +01:00
Vladimir Chebotarev 128262191b core.substitute() for arrays (#2048) 2018-02-26 14:09:11 +01:00
Richard Kuhnt f0a15886f2 Update validator.exe and shim.exe (#2024)
* Update Newtonsoft.Json and improve validator build process

* Improve shimexe build process and create deterministic builds
2018-02-20 18:48:02 +01:00
Richard Fussenegger b885ecf5ad Create sh shim (#1951)
* Create sh shim
* Fixed syntax error
* Shim CMD and PS only
* Added $arg to shims
* Added Script Switch to CMD
* Added JAR support and secured uninstall
2018-02-19 20:37:44 +01:00
Ross Smith II af41fc6efb Update virustotal command (#1918)
- Add * option to check all installed apps
- Add 60+ sec. pause after 4 queries/min to avoid 429/Too Many Requests
- Add immediate abort if query limit is exceeded
- Add INFO/WARN/ERROR prefixes to messages
- Add DarkGray/DarkCyan/DarkRed colors to INFO/WARN/ERROR messages
- Add using apikey if stored via: scoop config virustotal_api_key apikey
- Change colors to DarkGreen/DarkYellow/Yellow/Red for 0/1/2/3+ hit count
- Remove fragment from URL when submitting to virustotal.com
- Standardized INFO/WARN/ERROR messages
- virustotal: clean up per r15ch13's feedback
2017-12-28 17:24:02 +01:00
Richard Kuhnt 36dc7a880c Allow more architecture naming conventions for --arch parameters
closes #1908
2017-12-15 17:05:12 +01:00
Richard Kuhnt ef230c8b7b fix null reference error in strip_path() 2017-12-11 23:29:49 +01:00
Winter Young c86c727084 Fix scoop status error by improving scoop update (#1699)
* fix git status error
* Fix setting the lastupdate in is_scoop_outdated()
2017-09-10 19:46:19 +02:00
Richard Kuhnt d5c0654cc4 Improve ensure_all_installed() behavior 2017-08-30 22:12:32 +02:00
Richard Kuhnt 10bcc1f194 Add app_status() function to core
This function gathers all status information about an app and returns them as a hashtable
2017-08-30 22:10:44 +02:00
Richard Kuhnt 4ab82f60bb Run scoop update every so often before installing/updating apps
This change should reduce issues with outdated manifests/hashes/URLs.
Every successful execution of `scoop update` will save the date/time to `~\.scoop`
Every execution of `scoop update x` or `scoop install x` will check last saved date/time and run `scoop update` beforehand if the last run was more than 3 hours ago.
2017-08-30 17:17:38 +02:00
Richard Kuhnt 150cba623d Fix an error when reset_aliases() is called twice
Checks if the given scriptblock already exists
2017-08-30 17:07:27 +02:00
Richard Kuhnt 84bd16b82d Improve ensure_all_installed() behavior and move it to core.ps1
This change removes the use of abort() and exit 1 from ensure_all_installed() so the command doesn't stop if only one app in the list is not found.
2017-08-30 15:10:45 +02:00
Richard Kuhnt 9b3e7c83f9 Move applist() from update/cleanup commad to core 2017-08-30 15:06:54 +02:00
Nicolas Arnaud-Cormos 949cbabac0 Make scoop home agnostic
Rather use (Get-PsProvider 'FileSystem').home, in case the user
~ is not pointing to $home.
This can happen if the user wants to keep $home on $Env:USERPROFILE
but is working in a different folder and want it to be ~ (for simplicity).
2017-07-13 20:59:26 +02:00
Richard Kuhnt a92b76905e Running sccop from cmd without args should show help (closes #1530) 2017-06-02 17:46:27 +02:00
Richard Kuhnt e67d176d95 Change environment variables to uppercase 2017-05-31 00:27:21 +02:00
Richard Kuhnt f737315e73 Merge pull request #1517 from lukesampson/unix-compatible
[WIP] Add Unix compatibility (for maintenance jobs and manifest testing)
2017-05-30 21:59:15 +02:00
Richard Kuhnt 392bdf1a07 Move helper functions to unix.ps1 and updated comment 2017-05-28 14:08:27 +02:00
Richard Kuhnt 24fd3a3c7e Move unix compatible functions to unix.ps1
- Change helper functions to snake_case
2017-05-28 13:59:42 +02:00
Richard Kuhnt 5b4b2fce99 Some path fixes for unix 2017-05-27 17:12:37 +02:00
Richard Kuhnt d28cf794cc Add isUnix/isLinux/isMacOS helper functions 2017-05-27 17:07:36 +02:00
Richard Kuhnt a8de45f214 Use write-output instead of echo 2017-05-27 13:15:34 +02:00
Luke Sampson cef2564564 Escape tildes when generating .cmd shim. 2017-05-25 08:38:03 +10:00
Luke Sampson 58574b97d3 Escape parentheses when passing arguments from .cmd shims to PowerShell. 2017-05-25 07:37:47 +10:00
Richard Kuhnt c89d82762a Use 'mkdir -p' to create directories with ensure() 2017-05-24 21:48:45 +02:00
Richard Kuhnt 1c1d3fd16e Overwrite default path ($scoopdir, $globaldir and $cachedir) 2017-05-24 21:47:12 +02:00
Richard Kuhnt 75ea431922 Make core.ps1 and install.ps1 able to run on unix 2017-05-24 19:59:24 +02:00
Luke Sampson a4d44ac8f0 Allow .cmd shims to pass double-quoted arguments to PowerShell (see lukesampson/psutils#17). 2017-05-23 20:55:22 +10:00
Richard Kuhnt 4eb666c6ee Introducing $baseurl variable for hash file downloads 2017-05-14 14:53:25 +02:00
Richard Kuhnt 106daa83fd Regression 92ab8f5e8, readd substitute() 2017-05-14 05:12:18 +02:00
Richard Kuhnt 92ab8f5e80 Move some functions to core.ps1 2017-05-14 04:54:32 +02:00
Luke Sampson 47aac5b6ba Revert to ~ means $home instead of $env:userprofile (fix #1442) 2017-04-21 16:59:00 +10:00
Luke Sampson adf0e2cdaf Adjust style, use $env:userprofile for consistency 2017-04-21 08:41:43 +10:00
Marty Gentillon 6396fef55e Fixed bug where $home doesn't support .endswith
In Windows 10, at least after the Creators update, $h is of type
PathInfo, which does not support String operations.  By toStringing it,
we turn it into a String and enable the expected String operations.

see https://github.com/lukesampson/scoop/issues/1440
2017-04-20 15:27:37 -07:00
Richard Kuhnt 084f54ed47 Fix newline 2017-04-15 13:59:50 +02:00
Richard Kuhnt 3050a44244 Fix hash detection and improve json path for arrays 2017-04-15 13:58:55 +02:00