I am attempting to use startupActions to launch a second tab when Windows Terminal launches with no luck.
My default shell is WSL, so I have the following in my settings.json:
"startupActions": "; new-tab -p PowerShell",
I've tried it without the semi-colon and without the -p flag as well.
Here is the settings.json minus the color schemes:
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
},
{
"command": "paste",
"keys": "ctrl+v"
},
{
"command": "find",
"keys": "ctrl+shift+f"
},
{
"command":
{
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
},
"keys": "alt+shift+d"
}
],
"centerOnLaunch": true,
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"initialCols": 98,
"initialRows": 24,
"showTerminalTitleInTitlebar": false,
"startupActions": "; new-tab -p PowerShell",
"useAcrylicInTabRow": true,
"profiles":
{
"defaults":
{
"colorScheme": "Dracula",
"cursorShape": "filledBox",
"elevate": true,
"font":
{
"face": "MesloLGS NF",
"size": 12
},
"startingDirectory": null
},
"list":
[
{
"antialiasingMode": "cleartype",
"experimental.retroTerminalEffect": false,
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"name": "Command Prompt",
"opacity": 75,
"useAcrylic": true
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": true,
"name": "Azure Cloud Shell",
"opacity": 75,
"source": "Windows.Terminal.Azure",
"useAcrylic": true
},
{
"antialiasingMode": "cleartype",
"experimental.retroTerminalEffect": false,
"font":
{
"size": 12
},
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"hidden": false,
"name": "Ubuntu",
"opacity": 75,
"scrollbarState": "visible",
"source": "Windows.Terminal.Wsl",
"startingDirectory": "\\\\wsl$\\Ubuntu\\home\\steve",
"suppressApplicationTitle": true,
"tabColor": "#BD93F9",
"tabTitle": "Ubuntu 20.04",
"useAcrylic": true
},
{
"antialiasingMode": "cleartype",
"experimental.retroTerminalEffect": false,
"font":
{
"face": "Fira Code Retina"
},
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"opacity": 75,
"source": "Windows.Terminal.PowershellCore",
"tabColor": "#6272A4",
"useAcrylic": true
}
]
}
}
"elevate": true is your culprit here. You can't have mixed-elevation of tabs in the same window. Admin and non-admin windows need to stay separate. So when you launch those startupActions, the Terminal automatically creates a new admin window to host the powershell tab (which you've set to always run as admin).
Removing that setting from your powershell profile should work.
Related
I've been struggling with browserstack-cypress tests. I have set the BS by the documentation, tests are zipped and sent to be tested. But the specs won't be found.
Location of tests:
Directory: C:\Projects\cypress_008\application_1\version_1\integration\Visual_tests
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 02.05.2022 8:31 25813 KBO_Visual.spec.js
-a---- 11.05.2022 13:42 20317 MPSS_visual.spec.js
Error:
Can't run because no spec files were found.
We searched for specs matching this glob pattern:
> .\application_1\version_1\integration\Visual_tests\**\*
cypress run process exited with code 1
cypress run failed, exiting with code: 1
This is my cypress.json config:
{
"fixturesFolder": "application_1/version_1/fixtures",
"integrationFolder": "application_1/version_1/integration",
"pluginsFile":"plugins//index.js",
"supportFile":"support//index.js",
"screenshotsFolder": "screenshots",
"trashAssetsBeforeRuns": false,
"componentFolder": "component",
"videosFolder": "videos",
"downloadsFolder": "downloads",
"video": false,
"chromeWebSecurity": false,
"viewportWidth": 1920,
"viewportHeight": 1080,
"responseTimeout": 20000,
"requestTimeout": 20000,
"defaultCommandTimeout": 10000,
"pageLoadTimeout": 20000,
"taskTimeout": 180000,
"watchForFileChanges": false,
"baseUrl": "......",
"env": {
"ALLOW_SCREENSHOT": true,
"cypress-image-snapshot": {
"autoCleanUp": false,
"autopassNewSnapshots": true,
"diffLines": 3,
"excludeFields": [],
"ignoreExtraArrayItems": false,
"ignoreExtraFields": false,
"normalizeJson": true,
"prettier": true,
"imageConfig": {
"createDiffImage": true,
"resizeDevicePixelRatio": true,
"threshold": 0.2,
"thresholdType": "percent"
},
"screenshotConfig": {
"blackout": [],
"capture": "fullPage",
"clip": null,
"disableTimersAndAnimations": true,
"log": false,
"scale": false,
"timeout": 30000
},
"serverEnabled": true,
"serverHost": "localhost",
"serverPort": 2121,
"updateSnapshots": true,
"backgroundBlend": "difference"
},
And bstack.json
{
"auth": {
"username": "myaccountname",
"access_key": "mykey"
},
"browsers": [
{
"browser": "chrome",
"os": "Windows 10",
"versions": [
"latest",
"latest-1"
]
},
{
"browser": "firefox",
"os": "Windows 10",
"versions": [
"latest",
"latest-1"
]
},
{
"browser": "edge",
"os": "Windows 10",
"versions": [
"latest",
"latest-1"
]
},
{
"browser": "chrome",
"os": "OS X Mojave",
"versions": [
"latest",
"latest-1"
]
},
{
"browser": "firefox",
"os": "OS X Mojave",
"versions": [
"latest",
"latest-1"
]
},
{
"browser": "chrome",
"os": "OS X Catalina",
"versions": [
"latest",
"latest-1"
]
},
{
"browser": "firefox",
"os": "OS X Catalina",
"versions": [
"latest",
"latest-1"
]
}
],
"run_settings": {
"cypress_config_file": "application_1/version_1/cypress.json",
"project_name": "project",
"build_name": "build",
"spec_timeout":"2",
"exclude": [],
"parallels": "1",
"npm_dependencies": {
"cypress-image-snapshot": "^4.0.1"
},
"package_config_options": {},
"headless": false
},
"connection_settings": {
"local": true,
"local-identifier": "local_id",
"local_config_file": "./local_testing.yml"
},
"disable_usage_reporting": true
}
Ofcourse I've also tried to move it to folder in another level:
Directory: C:\Projects\cypress_008\application_1\version_1\integration
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 02.05.2022 16:26 Functional_tests
d----- 03.05.2022 10:43 Negative_tests
d----- 11.05.2022 13:28 Visual_tests
-a---- 02.05.2022 8:31 25813 KBO_Visual.spec.js
With err:
Can't run because no spec files were found.
We searched for specs matching this glob pattern:
> .\application_1\version_1\integration\KBO_Visual.spec.js
cypress run process exited with code 1
cypress run failed, exiting with code: 1
Expected is offcourse found files and tested via BS.
Any idea, what am I doing wrong?
I am new to Docker and want to understand image management better. A new image that I just created using
docker image build -t jefe/mh_db:v.1.1.0 ./
When I try to delete using
docker image rm d4c0c9225252
where d4c0c9225252 is the Image ID, returns
Error response from daemon: conflict: unable to delete d4c0c9225252 (cannot be forced) - image has dependent child images
Yes it's related to other posts regarding cannot delete. But I want to understand why a dependency exists.
How can this child image have images that are dependent upon it? I literally just created it
The dockerfile that is used in building the image
FROM mysql:5.7.27
MAINTAINER jefe
# Specify ports
EXPOSE 3306
Update
docker image ls | grep d4c0c9225252
jefe/mh_db v.1.1.0 d4c0c9225252 2 hours ago 373MB
Additionally
docker inspect d4c0c9225252
[
{
"Id": "sha256:d4c0c922525201d62e49ac73d03e27653e77e2ac5e3f11334a7a09d7c6d977fe",
"RepoTags": [
"jefe/mh_db:v.1.1.0"
],
"RepoDigests": [],
"Parent": "sha256:b0fead29523e498fd0f990abcc2b2bbb46952ad3361fbebcc304e31be69bd840",
"Comment": "",
"Created": "2019-08-08T15:24:57.324861036Z",
"Container": "6abc71375823faeb4819720a09ae348b0da4d9ae213c167c3911ca706d7c8b92",
"ContainerConfig": {
"Hostname": "6abc71375823",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"3306/tcp": {},
"33060/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.7",
"MYSQL_MAJOR=5.7",
"MYSQL_VERSION=5.7.27-1debian9"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"EXPOSE 3306"
],
"ArgsEscaped": true,
"Image": "sha256:b0fead29523e498fd0f990abcc2b2bbb46952ad3361fbebcc304e31be69bd840",
"Volumes": {
"/var/lib/mysql": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {}
},
"DockerVersion": "19.03.1",
"Author": "jefe",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"3306/tcp": {},
"33060/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.7",
"MYSQL_MAJOR=5.7",
"MYSQL_VERSION=5.7.27-1debian9"
],
"Cmd": [
"mysqld"
],
"ArgsEscaped": true,
"Image": "sha256:b0fead29523e498fd0f990abcc2b2bbb46952ad3361fbebcc304e31be69bd840",
"Volumes": {
"/var/lib/mysql": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 373273403,
"VirtualSize": 373273403,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/11891a42dc63fb6851e3fb12a1dd7e7285d18df83ecfd1f5aa40e44466921c58/diff:/var/lib/docker/overlay2/e0c695335789cba5a8e6524804bd1c2d1836db16650105e6863e7023bc289753/diff:/var/lib/docker/overlay2/2b4e10627f78a0185f8975b62b954a14e79fc6fb71a3caae07180e8e00f51b44/diff:/var/lib/docker/overlay2/f9dd057675e39a3eab99143f07bcb7df8a44eba5d1f1d15e567471a7c3a9e491/diff:/var/lib/docker/overlay2/c28612d7a8d1b187ddb7fc995c5fe733e0c18def13df798f1de5af2bdac9d3f4/diff:/var/lib/docker/overlay2/f8e41886d7ae8d8939ae2dc11b4ff941ef931aa18bc2f8cb0f724cc9e270ab3c/diff:/var/lib/docker/overlay2/8796390ee625b42b56d7822d128cc50bf88fbfd1f7f5ac9e7ecda9e721944946/diff:/var/lib/docker/overlay2/86552fa54367c794979383dbba257f1292f2a137dae0304d1eb036ba2249bc7b/diff:/var/lib/docker/overlay2/168353bdf70d8140026c2cf58da64eee7409f710832be601dad3e0cc6a02c01a/diff:/var/lib/docker/overlay2/ac908915344e5f65df6e0121f77bd48fdaa822974317cdb83a59f0618893ddb2/diff",
"MergedDir": "/var/lib/docker/overlay2/1826972009d9ce18265129a2d4928b708bf6780370530e4c1be8b1efd096b2cd/merged",
"UpperDir": "/var/lib/docker/overlay2/1826972009d9ce18265129a2d4928b708bf6780370530e4c1be8b1efd096b2cd/diff",
"WorkDir": "/var/lib/docker/overlay2/1826972009d9ce18265129a2d4928b708bf6780370530e4c1be8b1efd096b2cd/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:d56055da3352f918f4d8a42350385ea5b10d0906e746a8fbb4b850f9284deee5",
"sha256:b78ec9586b345b0efdb0297261c0044652563045a28a7cc6d27dd314eda1e0eb",
"sha256:c6926fcee1912ebb41215a70b1d0ed77e3b8db38cfe69b936d18b346096e144c",
"sha256:007a7f930352c0fd98663021fb1ee08768462eb5bc9045342da9e9f73fd79a7f",
"sha256:2f1b41b24201f4ae635819b1d7717ab04c000f04e7708de3bb012a60d3ef630b",
"sha256:77737de99484a6e2e2ae4bea0cf7ec4d3063827a6dd49a243694ef00929350d2",
"sha256:7e7fffcdabb3e0655bf46756dd04018ce051f81fbaba8bff3703ac987def88be",
"sha256:83bba64580292cc5af1fd3cabb74b18c143e05cd45d882c9e09edc8ff79a1119",
"sha256:94f63a189eef2bdb32668faa0ce08dc5da01eccb91ad548f28052048e810e5f8",
"sha256:0c3e10ddbe75e0a4efcee6aa06716b651227ceb358e78922b9fe9ea7f5a63992",
"sha256:5572431ce4dea5defe6a0d0586ad3b25a74d59bfbbb05c2a257c5d71a27eba4c"
]
},
"Metadata": {
"LastTagTime": "2019-08-08T15:24:57.393863976Z"
}
}
Docker wont let you delete an image if you have more than one tag on it. To find out the tags you can filter the output of docker image ls
docker image ls | grep d4c0c9225252
I have configured several test settings and I want to run parallel chrome and ie.
When I run
./node_modules/.bin/nightwatch --env chrome
test for chrome runs
./node_modules/.bin/nightwatch --env ie
test for ie runs
./node_modules/.bin/nightwatch --env ie,chrome
test for firefox runs (as I guess this run only default ones and nothing more)
Nightwatch 1.0.18
{
"src_folders": [
"test"
],
"output_folder": "reports",
"live_output" : true,
"custom_commands_path": "config/commands",
"test_runner": {
"type" : "mocha",
"options" : {
"grep": "#acc"
}
},
"test_settings": {
"default": {
"selenium_host": "hub-cloud.browserstack.com",
"selenium_port": 80,
"launch_url": "localhost",
"browserstack.key": "KEY",
"browserstack.user": "USER",
"browserstack.local": "true"
},
"chrome-local": {
"default_path_prefix": "",
"launch_url": "localhost",
"screenshots": {
"enabled": true,
"on_failure": true,
"on_success": true,
"on_error": true,
"path": "./screenshots"
},
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"chromeOptions": {
"args": [
"--no-sandbox",
"headless",
"window-size=1920,1200"
]
},
"acceptSslCerts": true,
"acceptInsecureCerts": true,
"elementScrollBehavior": 1
}
},
"chrome": {
"desiredCapabilities": {
"browser": "chrome"
}
},
"ie": {
"desiredCapabilities": {
"browserName": "ie",
}
}
}
}
for running parallel tests using Nightwatch refer - https://github.com/browserstack/nightwatch-browserstack
As you need to run parallel tests on Chrome and IE browsers you need to make changes to the line https://github.com/browserstack/nightwatch-browserstack/blob/master/package.json#L10 as follows-
"parallel": "./node_modules/.bin/nightwatch -c conf/parallel.conf.js
-e ie,chrome"
I'm trying to launch multiple programs that need to talk to each other in the debugger in VS Code and created a launch.json with a compound that launches each of the executables. The programs launch simultaneously and all try to connect to the host at the same time. Is there any way in VS Code to explicitly set some sort of time delay between launch of each of the executables, say 250ms or so?
{
"version": "0.2.0",
"configurations": [
{
"name": "Host",
"type": "cppdbg",
"request": "launch",
"program": "/home/user/build/bin/host",
"args": [],
"stopAtEntry": false,
"cwd": "/home/user/build/bin",
"environment": [],
"externalConsole": true,
"linux": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
},
{
"name": "Node A",
"type": "cppdbg",
"request": "launch",
"program": "/home/user/build/bin/Node_A",
"args": ["ArgA", "ArgB", "ArgC"],
"stopAtEntry": false,
"cwd": "/home/user/build/bin",
"environment": [],
"externalConsole": true,
"linux": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
},
{
"name": "Node B",
"type": "cppdbg",
"request": "launch",
"program": "/home/user/build/bin/Node_B",
"args": ["ArgA", "ArgB", "ArgC"],
"stopAtEntry": false,
"cwd": "/home/user/build/bin",
"environment": [],
"externalConsole": true,
"linux": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
}
],
"compounds": [
{
"name": "System",
"configurations": ["Host", "Node A", "Node B"]
}
]
}
Yes, you can add a prelaunch task which will sleep for x seconds.
So say you have a client and server on Node.js and the server db connection takes longer to load this causes problems with the client.
Delaying the client debugger on vscode would work like this on a Mac OS X
First create a task in the same folder as the launch.json file called tasks.json which will build out a shell command before launching the client.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Sleepdelay",
"type": "shell",
"command": "sleep 6",
"windows": {
"command": "ping 127.0.0.1 -n 6 > nul"
},
"group": "none",
"presentation": {
"reveal": "silent",
"panel": "new"
}
}
]
}
Add the following pretask to your launch.json file now to call the task
{
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Client",
"url": "http://localhost:9090",
"webRoot": "${workspaceFolder}/client/src",
"breakOnLoad": true,
"sourceMapPathOverrides": {
"webpack:///./src/*": "${webRoot}/*"
},
"preLaunchTask": "Sleepdelay"
//"runtimeExecutable": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
},
{
"type": "node",
"request": "launch",
"name": "Server",
"program": "${workspaceFolder}/server/server.js",
"envFile": "${workspaceFolder}/server/.env",
"cwd": "${workspaceFolder}/server/"
}
],
"compounds": [
{
"name": "Server/Client",
"configurations": ["Server", "Client"]
}
]
}
The sleep command is available on Linux and MAC OS X. For Windows just use this hack in place of it:
ping 127.0.0.1 -n 6 > nul
Now you have a simple method to delay the launch of the client before the server.
Complementing Jason's answer
I was getting Error
OpenError: (:) [Out-File], NotSupportedException FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand
On Windows (PowerShell Terminal), and have to change the ping hack command from:
"ping 127.0.0.1 -n 6 > nul"
to:
"ping 127.0.0.1 -n 6 > $null"
I have Sublime Text 3, with Sublimelinter, the sublimelinter-jshint package, and jshint installed with the correct path set. I can run 'jslint app.js' in the terminal and it runs fine. Mac OSX.
{
"user": {
"debug": true,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"coffeelint": {
"#disable": false,
"args": [],
"excludes": []
},
"csslint": {
"#disable": false,
"args": [],
"errors": "",
"excludes": [],
"ignore": "",
"warnings": ""
},
"jshint": {
"#disable": false,
"args": [],
"excludes": [],
"note": true
}
},
"mark_style": "solid underline",
"no_column_highlights_line": false,
"passive_warnings": false,
"paths": {
"linux": [],
"osx": [
//"/usr/local/bin/jshint" i've tried this too
],
"windows": []
},
"python_paths": {
"linux": [],
"osx": [],
"windows": []
},
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": true,
"show_marks_in_minimap": true,
"syntax_map": {
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"php": "html",
"python django": "python"
},
"warning_color": "DDB700",
"wrap_find": true
}
}
No errors are being output from the console when I run commands to the package. if I run 'show all errors' it says 'No errors found'.