Skip to content

Commit

Permalink
fix: Move global Eask-file config to home (#194)
Browse files Browse the repository at this point in the history
* fix: Move global Eask-file config to home

* fix

* rev
  • Loading branch information
jcs090218 authored Oct 13, 2023
1 parent 0faeca4 commit b45700e
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 61 deletions.
2 changes: 1 addition & 1 deletion lisp/_prepare.el
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ This uses function `locate-dominating-file' to look up directory tree."
;; for the sandbox.
(eask-with-verbosity 'debug
(eask-ignore-errors ; Again, without Eask-file needed!
(if (eask-file-try-load "../")
(if (eask-file-try-load "./")
(eask-msg "✓ Loading global Eask file in %s... done!" eask-file)
(eask-msg "✗ Loading global Eask file... missing!")))
(eask-msg ""))
Expand Down
2 changes: 1 addition & 1 deletion lisp/core/status.el
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

(defun eask--environment-name ()
"Get the working environment name."
(cond ((eask-global-p) "global (~/.eask/)")
(cond ((eask-global-p) "global (~/)")
((eask-config-p) (format "configuration (%s)" user-emacs-directory))
(t "development (./)")))

Expand Down
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function el_script(name) {
*/
function _environment_name (argv) {
if (argv.global)
return 'global (~/.eask/)';
return 'global (~/)';
else if (argv.config)
return 'configuration (~/.emacs.d/)';
else
Expand Down
2 changes: 1 addition & 1 deletion test/commands/config/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
set -e

echo "Copy test configuration"
./test/fixtures/mini.emacs.d/scripts/copy_config.sh
./test/fixtures/home/scripts/setup.sh

echo "Testing config (~/.emacs.d/) commands..."
eask archives -c
Expand Down
4 changes: 2 additions & 2 deletions test/commands/global/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
set -e

echo "Copy test configuration"
./test/fixtures/mini.eask/scripts/copy_eask.sh
./test/fixtures/home/scripts/setup.sh

echo "Testing global (~/.eask/) commands..."
echo "Testing global (~/) commands..."
eask archives -g

eask install -g spinner ivy beacon company fuzzy
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions test/fixtures/home/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.eask
4 changes: 2 additions & 2 deletions test/fixtures/mini.eask/Eask → test/fixtures/home/Eask
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(package "mini.eask"
(package "home"
"0.0.1"
"Minimal test .eask")
"Minimal test for global config")

(website-url "https://github.com/emacs-eask/mini.eask")
(keywords "test")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@

echo "Copy test configuration"
mkdir "$env:USERPROFILE/AppData/Roaming/.eask"
robocopy /e "./test/fixtures/mini.eask/" "$env:USERPROFILE/AppData/Roaming/.eask"
robocopy /e "./test/fixtures/home/_eask/" "$env:USERPROFILE/AppData/Roaming/.eask"
robocopy /e "./test/fixtures/home/Eask" "$env:USERPROFILE/AppData/Roaming/Eask"

echo "Copy test configuration"
mkdir "$env:USERPROFILE/AppData/Roaming/.emacs.d"
robocopy /e "./test/fixtures/home/.emacs.d/" "$env:USERPROFILE/AppData/Roaming/.emacs.d"
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@
#

echo "Copy test .eask"
cp -R ./test/fixtures/mini.eask/ ~/.eask
cp -R ./test/fixtures/home/_eask/ ~/.eask
cp -R ./test/fixtures/home/Eask ~/Eask

echo "Copy test configuration"
cp -R ./test/fixtures/home/.emacs.d/ ~/.emacs.d
25 changes: 0 additions & 25 deletions test/fixtures/mini.emacs.d/scripts/copy_config.ps1

This file was deleted.

26 changes: 0 additions & 26 deletions test/fixtures/mini.emacs.d/scripts/copy_config.sh

This file was deleted.

0 comments on commit b45700e

Please sign in to comment.